Run rustfmt

This commit is contained in:
kayibal
2024-03-14 00:27:52 +00:00
parent 425628ae97
commit 6b6e42e2f8
6 changed files with 92 additions and 83 deletions

View File

@@ -10,9 +10,10 @@
/// more [here](https://streamingfastio.medium.com/new-block-model-to-accelerate-chain-integration-9f65126e5425)
use std::collections::HashMap;
use substreams_ethereum::pb::eth;
use substreams_ethereum::pb::eth::v2::block::DetailLevel;
use substreams_ethereum::pb::eth::v2::StorageChange;
use substreams_ethereum::pb::{
eth,
eth::v2::{block::DetailLevel, StorageChange},
};
use crate::pb::tycho::evm::v1::{self as tycho};
@@ -78,7 +79,8 @@ impl From<InterimContractChange> for tycho::ContractChange {
/// ## Arguments
///
/// * `block` - The block to extract changes from. Must be the extended block model.
/// * `inclusion_predicate` - A predicate function that determines if a contract address is relevant.
/// * `inclusion_predicate` - A predicate function that determines if a contract address is
/// relevant.
/// * `transaction_contract_changes` - A mutable map to store the contract changes in.
///
/// ## Panics
@@ -189,9 +191,9 @@ pub fn extract_contract_changes<F: Fn(&[u8]) -> bool>(
.extend_from_slice(&code_change.new_code);
});
if !storage_changes.is_empty()
|| !balance_changes.is_empty()
|| !code_changes.is_empty()
if !storage_changes.is_empty() ||
!balance_changes.is_empty() ||
!code_changes.is_empty()
{
transaction_contract_changes
.entry(block_tx.index.into())