Skip to content

Commit

Permalink
remove codes
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing committed Sep 23, 2024
1 parent b55e45d commit da142fc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,14 @@ define bsc_docker_build_push
mkdir -p $(BIN_DIR)/amd64
cp $(BUILD_PATH)/x86_64-unknown-linux-gnu/$(PROFILE)/bsc-reth $(BIN_DIR)/amd64/bsc-reth

$(MAKE) bsc-build-aarch64-unknown-linux-gnu
mkdir -p $(BIN_DIR)/arm64
cp $(BUILD_PATH)/aarch64-unknown-linux-gnu/$(PROFILE)/bsc-reth $(BIN_DIR)/arm64/bsc-reth

docker buildx build --file ./DockerfileBsc.cross . \
--platform linux/amd64 \
--platform linux/amd64,linux/arm64 \
--tag $(DOCKER_IMAGE_NAME):$(1) \
--tag $(DOCKER_IMAGE_NAME):$(2) \
--provenance=false \
--push
endef
Expand Down
2 changes: 2 additions & 0 deletions crates/chain-state/src/cache/cached_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use reth_trie::{
};
use std::collections::HashMap;

/*
/// Trait for caching state data
pub trait StateCache<AK, AV, SK, SV, CK, CV>: Send + Sync {
/// Get account from cache
Expand All @@ -27,6 +28,7 @@ pub trait StateCache<AK, AV, SK, SV, CK, CV>: Send + Sync {
/// Insert code into cache
fn insert_code(&self, k: CK, v: CV);
}
*/

/// Cached state provider struct
#[allow(missing_debug_implementations)]
Expand Down
2 changes: 1 addition & 1 deletion crates/chain-state/src/cache/plain_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
sync::Mutex,
};

use crate::StateCache;
//use crate::StateCache;
use metrics::counter;
use reth_primitives::{Account, Address, Bytecode, StorageKey, StorageValue, B256, U256};
use reth_revm::db::{BundleState, OriginalValuesKnown};
Expand Down
2 changes: 1 addition & 1 deletion crates/chain-state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub use notifications::{
mod memory_overlay;
pub use memory_overlay::MemoryOverlayStateProvider;

pub use cache::cached_provider::{CachedStateProvider, StateCache};
pub use cache::cached_provider::CachedStateProvider;

/// Cache layer for plain states, hashed states and trie nodes.
pub mod cache;
Expand Down
5 changes: 0 additions & 5 deletions crates/trie/trie/src/hashed_cursor/post_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::{
forward_cursor::ForwardInMemoryCursor, HashedAccountsSorted, HashedPostStateSorted,
HashedStorageSorted,
};
use metrics::counter;
use reth_primitives::{Account, B256, U256};
use reth_storage_errors::db::DatabaseError;
use std::collections::HashSet;
Expand Down Expand Up @@ -147,8 +146,6 @@ where
/// The returned account key is memoized and the cursor remains positioned at that key until
/// [`HashedCursor::seek`] or [`HashedCursor::next`] are called.
fn seek(&mut self, key: B256) -> Result<Option<(B256, Self::Value)>, DatabaseError> {
counter!("post_state.account.total").increment(1);

// Find the closes account.
let entry = self.seek_inner(key)?;
self.last_account = entry.as_ref().map(|entry| entry.0);
Expand Down Expand Up @@ -286,8 +283,6 @@ where

/// Seek the next account storage entry for a given hashed key pair.
fn seek(&mut self, subkey: B256) -> Result<Option<(B256, Self::Value)>, DatabaseError> {
counter!("post_state.storage.total").increment(1);

let entry = self.seek_inner(subkey)?;
self.last_slot = entry.as_ref().map(|entry| entry.0);
Ok(entry)
Expand Down

0 comments on commit da142fc

Please sign in to comment.