From db2288c3129722da55531a5b47b0c0aa8c778ece Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Tue, 19 Dec 2023 08:16:50 +0100 Subject: [PATCH] remove unused variable --- examples/stream_blocks_mainnet.rs | 8 +++----- src/grpcmultiplex_fastestwins.rs | 7 ------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/examples/stream_blocks_mainnet.rs b/examples/stream_blocks_mainnet.rs index 236a353..1f597b9 100644 --- a/examples/stream_blocks_mainnet.rs +++ b/examples/stream_blocks_mainnet.rs @@ -104,14 +104,13 @@ pub async fn main() { if subscribe_blocks { info!("Write Block stream.."); let green_stream = - create_geyser_reconnecting_stream(green_config.clone(), GeyserFilter::blocks(), CommitmentConfig::confirmed()); + create_geyser_reconnecting_stream(green_config.clone(), GeyserFilter::blocks_and_txs(), CommitmentConfig::confirmed()); let blue_stream = - create_geyser_reconnecting_stream(blue_config.clone(), GeyserFilter::blocks(), CommitmentConfig::confirmed()); + create_geyser_reconnecting_stream(blue_config.clone(), GeyserFilter::blocks_and_txs(), CommitmentConfig::confirmed()); let toxiproxy_stream = - create_geyser_reconnecting_stream(toxiproxy_config.clone(), GeyserFilter::blocks(), CommitmentConfig::confirmed()); + create_geyser_reconnecting_stream(toxiproxy_config.clone(), GeyserFilter::blocks_and_txs(), CommitmentConfig::confirmed()); let multiplex_stream = create_multiplex( vec![green_stream, blue_stream, toxiproxy_stream], - CommitmentConfig::confirmed(), BlockExtractor(CommitmentConfig::confirmed()), ); start_example_block_consumer(multiplex_stream); @@ -127,7 +126,6 @@ pub async fn main() { create_geyser_reconnecting_stream(toxiproxy_config.clone(), GeyserFilter::blocks_meta(), CommitmentConfig::confirmed()); let multiplex_stream = create_multiplex( vec![green_stream, blue_stream, toxiproxy_stream], - CommitmentConfig::confirmed(), BlockMetaExtractor(CommitmentConfig::confirmed()), ); start_example_blockmeta_consumer(multiplex_stream); diff --git a/src/grpcmultiplex_fastestwins.rs b/src/grpcmultiplex_fastestwins.rs index b3c4317..d9fa03f 100644 --- a/src/grpcmultiplex_fastestwins.rs +++ b/src/grpcmultiplex_fastestwins.rs @@ -24,18 +24,11 @@ struct TaggedMessage { /// note: this is agnostic to the type of the stream pub fn create_multiplex( grpc_source_streams: Vec>, - commitment_config: CommitmentConfig, mapper: M, ) -> impl Stream where M: FromYellowstoneMapper, { - assert!( - commitment_config == CommitmentConfig::confirmed() - || commitment_config == CommitmentConfig::finalized(), - "Only CONFIRMED and FINALIZED is supported" - ); - // note: PROCESSED blocks are not sequential in presense of forks; this will break the logic if grpc_source_streams.is_empty() { panic!("Must have at least one source");