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:
Christopher Jämthagen authored and Olaoluwa Osuntokun committed 2017-02-22 15:46:59 -08:00
1 parent e910b12d33
commit 873211c02f
5 files changed
+32 -24

No files matched your search

+1 -1
View File
@@ -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 {