Skip to content

Commit

Permalink
chore: Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Dec 3, 2023
1 parent e6b3b67 commit 594f406
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions block-streamer/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
use tracing_subscriber::prelude::*;

// use crate::indexer_config::IndexerConfig;
// use crate::rules::types::indexer_rule_match::ChainId;
// use crate::rules::{IndexerRule, IndexerRuleKind, MatchingRule, Status};

mod block_stream;
mod delta_lake_client;
mod indexer_config;
Expand All @@ -19,8 +15,6 @@ async fn main() -> anyhow::Result<()> {
.with(tracing_subscriber::EnvFilter::from_default_env())
.init();

std::env::var("CHAIN_ID").expect("expected`CHAIN_ID` to be set in the environment");

tracing::info!("Starting Block Streamer Service...");

let redis_connection_manager = redis::connect("redis://127.0.0.1").await?;
Expand All @@ -33,47 +27,4 @@ async fn main() -> anyhow::Result<()> {
server::init(redis_connection_manager, delta_lake_client).await?;

Ok(())

//
// let aws_config = aws_config::from_env().load().await;
// let s3_client = crate::s3_client::S3Client::new(&aws_config);
//
// let delta_lake_client = crate::delta_lake_client::DeltaLakeClient::new(s3_client);
//
// let contract = "queryapi.dataplatform.near";
// let matching_rule = MatchingRule::ActionAny {
// affected_account_id: contract.to_string(),
// status: Status::Any,
// };
// let filter_rule = IndexerRule {
// indexer_rule_kind: IndexerRuleKind::Action,
// matching_rule,
// id: None,
// name: None,
// };
// let indexer = IndexerConfig {
// account_id: "buildnear.testnet".to_string().parse().unwrap(),
// function_name: "index_stuff".to_string(),
// code: "".to_string(),
// start_block_height: Some(85376002),
// schema: None,
// provisioned: false,
// indexer_rule: filter_rule,
// };
//
// let mut streamer = block_stream::BlockStream::new();
//
// streamer.start(
// 106000000,
// indexer,
// redis_connection_manager,
// delta_lake_client,
// ChainId::Mainnet,
// )?;
//
// streamer.take_handle().unwrap().await??;
//
// println!("done");
//
// Ok(())
}

0 comments on commit 594f406

Please sign in to comment.