-
Notifications
You must be signed in to change notification settings - Fork 130
refactor(l1,l2,levm): remove dead code #5452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fdfe677
c70b7b6
3c30aed
3bcb75e
c96149a
e601ecb
588a3bf
4f52946
68bdae9
8dc41c2
454e767
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ use ethrex_common::types::Code; | |
| use ethrex_common::{ | ||
| H256, | ||
| constants::{EMPTY_KECCACK_HASH, EMPTY_TRIE_HASH}, | ||
| types::{AccountState, Block, BlockHash, BlockHeader}, | ||
| types::{AccountState, Block, BlockHeader}, | ||
| }; | ||
| use ethrex_rlp::{decode::RLPDecode, encode::RLPEncode, error::RLPDecodeError}; | ||
| use ethrex_storage::{Store, error::StoreError}; | ||
|
|
@@ -585,31 +585,6 @@ async fn store_block_bodies( | |
| Ok(()) | ||
| } | ||
|
|
||
| /// Fetches all receipts for the given block hashes via p2p and stores them | ||
| // TODO: remove allow when used again | ||
| #[allow(unused)] | ||
| async fn store_receipts( | ||
| mut block_hashes: Vec<BlockHash>, | ||
| mut peers: PeerHandler, | ||
| store: Store, | ||
| ) -> Result<(), SyncError> { | ||
| loop { | ||
| debug!("Requesting Receipts "); | ||
| if let Some(receipts) = peers.request_receipts(block_hashes.clone()).await? { | ||
| debug!(" Received {} Receipts", receipts.len()); | ||
| // Track which blocks we have already fetched receipts for | ||
| for (block_hash, receipts) in block_hashes.drain(0..receipts.len()).zip(receipts) { | ||
| store.add_receipts(block_hash, receipts).await?; | ||
| } | ||
| // Check if we need to ask for another batch | ||
| if block_hashes.is_empty() { | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| Ok(()) | ||
| } | ||
|
|
||
|
Comment on lines
-588
to
-612
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be used when we address #1766 , maybe we should leave it and link the issue?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is #1766 going to be addressed soon? While that issue is not being addressed, I'd prefer to mention this thread in the issue and remove the code for now. |
||
| /// Persisted State during the Block Sync phase for SnapSync | ||
| #[derive(Clone)] | ||
| pub struct SnapBlockSyncState { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though the import command used this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done by
read_chain_file, which is almost identical.