forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve eth_getLogs performance for latest block (paradigmxyz#6305)
Co-authored-by: Matthias Seitz <[email protected]>
- Loading branch information
Showing
3 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
use crate::{BlockNumber, B256}; | ||
use crate::{BlockNumHash, BlockNumber, B256}; | ||
|
||
/// Current status of the blockchain's head. | ||
#[derive(Default, Clone, Debug, Eq, PartialEq)] | ||
#[derive(Default, Copy, Clone, Debug, Eq, PartialEq)] | ||
pub struct ChainInfo { | ||
/// The block hash of the highest fully synced block. | ||
pub best_hash: B256, | ||
/// The block number of the highest fully synced block. | ||
pub best_number: BlockNumber, | ||
} | ||
|
||
impl From<ChainInfo> for BlockNumHash { | ||
fn from(value: ChainInfo) -> Self { | ||
BlockNumHash { number: value.best_number, hash: value.best_hash } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters