Commit 8905ea8
authored
rpc: fix GetBlockTransactionCountByNumber with Pending (#19335)
When blockNr is set to rpc.PendingBlockNumber (-1), performing a direct
conversion via .Uint64() results in an integer overflow. This transforms
the special 'pending' tag into a literal, extremely large block number
(2^{64}-1). Consequently, the blockByNumberWithSenders() function fails
to recognize it as a special case and attempts to query a non-existent
block height from the database1 parent bf8f735 commit 8905ea8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| |||
0 commit comments