Commit 2c64396
committed
miner: fix block number extraction for BlockSigner tx
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 292c050 commit 2c64396
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 | | |
| |||
990 | 989 | | |
991 | 990 | | |
992 | 991 | | |
993 | | - | |
| 992 | + | |
994 | 993 | | |
995 | 994 | | |
996 | 995 | | |
| |||
0 commit comments