fix(rpc): resolve AtBlockHash to single block in eth_getFilterChanges (#22283)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
MergeBot
2026-02-17 21:15:33 +01:00
committed by GitHub
parent 9ecef47aff
commit 59993b974a

View File

@@ -271,11 +271,15 @@ where
.flatten();
logs_utils::get_filter_block_range(from, to, start_block, info)?
}
FilterBlockOption::AtBlockHash(_) => {
FilterBlockOption::AtBlockHash(block_hash) => {
// blockHash is equivalent to fromBlock = toBlock = the block number with
// hash blockHash
// get_logs_in_block_range is inclusive
(start_block, best_number)
let block_number = self
.provider()
.block_number(block_hash)?
.ok_or(ProviderError::HeaderNotFound(block_hash.into()))?;
(block_number, block_number)
}
};
let logs = self