remove unused variable
This commit is contained in:
parent
cfef19a3a6
commit
db2288c312
|
@ -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);
|
||||
|
|
|
@ -24,18 +24,11 @@ struct TaggedMessage {
|
|||
/// note: this is agnostic to the type of the stream
|
||||
pub fn create_multiplex<M>(
|
||||
grpc_source_streams: Vec<impl Stream<Item = Message>>,
|
||||
commitment_config: CommitmentConfig,
|
||||
mapper: M,
|
||||
) -> impl Stream<Item = M::Target>
|
||||
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");
|
||||
|
|
Loading…
Reference in New Issue