You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code, I've been passing the block number through, but passing the block hash through will give consistent answers if a re-org happens in the middle of some calls.
I think functions that have block: Option<BlockNumber> in their args would need to change, but I haven't thought about exactly how yet.
enum BlockId {
Number(BlockNumber),
/// Block hash and a boolean for requireCanonical
Hash(H256, bool),
}
But maybe the BlockNumber enum should have Hash(H256, bool) added to it instead? It looks like that would cover all the functions needed. I'm not sure if it covers too much though. The name "BlockNumber" also wouldn't fit as well. I think renaming it to "BlockId" matches the better since it has strings like "latest" and "earliest" in it, too.
I noticed that Geth 1.9.6 added support for specifying block hashes for some methods (ethereum/go-ethereum#19491).
https://eips.ethereum.org/EIPS/eip-1898
In my code, I've been passing the block number through, but passing the block hash through will give consistent answers if a re-org happens in the middle of some calls.
I think functions that have
block: Option<BlockNumber>
in their args would need to change, but I haven't thought about exactly how yet.rust-web3/src/api/eth.rs
Line 42 in f043b22
The text was updated successfully, but these errors were encountered: