Commit 51b99e4
authored
miner: fix block number extraction for BlockSigner tx (#1894)
Previously, the code used binary.BigEndian.Uint64(data[8:40]), which incorrectly read the index and only extracted the highest 8 bytes of the 32-byte left-padded block number, resulting in wrong values (often zero).
Now, the code uses new(big.Int).SetBytes(data[4:36]).Uint64() to correctly extract the block number from the proper 32-byte field.
This change fixes both the incorrect index and the parsing logic, ensuring accurate block number extraction and correct validation for special transactions.1 parent 84ac794 commit 51b99e4
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
1020 | 1019 | | |
1021 | 1020 | | |
1022 | 1021 | | |
1023 | | - | |
| 1022 | + | |
1024 | 1023 | | |
1025 | 1024 | | |
1026 | 1025 | | |
| |||
0 commit comments