Skip to content

Commit 0c3b925

Browse files
author
Ksenia Troshchenkova
committed
chore: filter block to emit protocol components once
1 parent df3c847 commit 0c3b925

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

substreams/ethereum-lido/src/modules/1_map_components.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ use crate::modules::map_component_balance::{ETH_ADDRESS, ST_ETH_ADDRESS, WST_ETH
2121
fn map_protocol_components(
2222
params: String,
2323
block: eth::v2::Block,
24+
) -> Result<BlockTransactionProtocolComponents> {
25+
if block.number != params.parse::<u64>().unwrap() {
26+
return Ok(BlockTransactionProtocolComponents { tx_components: vec![] })
27+
}
2428
Ok(BlockTransactionProtocolComponents {
2529
tx_components: block
2630
.transactions()

0 commit comments

Comments
 (0)