mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 14:44:22 +01:00
Use 48-bit commitment transaction numbers
Fix SetStateNumHint and GetStateNumHint to properly set and get the stateNumHints using the lower 24 bits of the locktime of the commitment transaction as the lower 24 bits of the obfuscated state number and the lower 24 bits of the sequence field as the higher 24 bits.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
e910b12d33
commit
873211c02f
@@ -571,7 +571,7 @@ func TestCommitTxStateHint(t *testing.T) {
|
||||
copy(obsfucator[:], testHdSeed[:StateHintSize])
|
||||
|
||||
for i := 0; i < 10000; i++ {
|
||||
stateNum := uint32(i)
|
||||
stateNum := uint64(i)
|
||||
|
||||
err := SetStateNumHint(commitTx, stateNum, obsfucator)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user