mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(provider): fix subtract overflow on block_state_by_tx_id (#10467)
This commit is contained in:
@ -165,7 +165,7 @@ where
|
||||
let Some(body_index) = provider.block_body_indices(block_number)? else {
|
||||
return Ok(None)
|
||||
};
|
||||
let tx_index = id - body_index.last_tx_num();
|
||||
let tx_index = body_index.last_tx_num() - id;
|
||||
Ok(Some((None, tx_index as usize)))
|
||||
} else {
|
||||
// Otherwise, iterate through in-memory blocks and find the transaction with the
|
||||
|
||||
Reference in New Issue
Block a user