Skip to content

Commit

Permalink
Add important comment to Executor snippet (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-cw authored Mar 25, 2024
1 parent b749725 commit b8c81b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/eth/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ impl EthExecutor {
// convert block
let block = Block::from_external(block, executions)?;

let block_changes = block.compact_account_changes();

// Update block snapshot for integration testing
// Block 292973 from CloudWalk Network Mainnet
if *block.number() == BlockNumber::from(292973) {
let block_changes = block.compact_account_changes();
let state = InMemoryPermanentStorage::dump_snapshot(block_changes).await;
let state_string = serde_json::to_string(&state)?;
let mut file = std::fs::File::create("tests/fixtures/block-292973/snapshot.json")?;
Expand Down
4 changes: 2 additions & 2 deletions src/eth/storage/hybrid/query_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ type Addresses = Vec<Address>;
type OptionalBytes = Vec<Option<Bytes>>;
type Weis = Vec<Wei>;
type Nonces = Vec<Nonce>;
type CodeHashs = Vec<CodeHash>;
type CodeHashes = Vec<CodeHash>;

type AccountChanges = (BlockNumbers, Addresses, OptionalBytes, Weis, Nonces, CodeHashs);
type AccountChanges = (BlockNumbers, Addresses, OptionalBytes, Weis, Nonces, CodeHashes);
type AccountSlotChanges = (BlockNumbers, Vec<SlotIndex>, Addresses, Vec<SlotValue>);

async fn execute_with_retry<F, Fut>(mut attempt: F, max_attempts: u32, initial_delay: Duration) -> Result<(), sqlx::Error>
Expand Down

0 comments on commit b8c81b2

Please sign in to comment.