Skip to content
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

skip v0_0_5 check: always remove unsucessful trxs on call handlers #4149

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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