Skip to content

Commit

Permalink
skip v0_0_5 check: always remove unsucessful trxs on call handlers (#…
Browse files Browse the repository at this point in the history
…4149)

Co-authored-by: Stéphane Duchesneau <stephane.duchesneau@streamingfast.io>
  • Loading branch information
sduchesneau and sduchesneau authored Nov 8, 2022
1 parent e139890 commit 587b99d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions chain/ethereum/src/ethereum_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use graph::blockchain::BlockHash;
use graph::blockchain::ChainIdentifier;
use graph::components::transaction_receipt::LightTransactionReceipt;
use graph::data::subgraph::UnifiedMappingApiVersion;
use graph::data::subgraph::API_VERSION_0_0_5;
use graph::data::subgraph::API_VERSION_0_0_7;
use graph::prelude::ethabi::ParamType;
use graph::prelude::ethabi::Token;
Expand Down Expand Up @@ -1460,14 +1459,10 @@ pub(crate) async fn blocks_with_triggers(
.await?;

// Filter out call triggers that come from unsuccessful transactions
let mut blocks = if unified_api_version.equal_or_greater_than(&API_VERSION_0_0_5) {
let futures = blocks.into_iter().map(|block| {
filter_call_triggers_from_unsuccessful_transactions(block, &eth, &chain_store, &logger)
});
futures03::future::try_join_all(futures).await?
} else {
blocks
};
let futures = blocks.into_iter().map(|block| {
filter_call_triggers_from_unsuccessful_transactions(block, &eth, &chain_store, &logger)
});
let mut blocks = futures03::future::try_join_all(futures).await?;

blocks.sort_by_key(|block| block.ptr().number);

Expand Down

0 comments on commit 587b99d

Please sign in to comment.