diff --git a/grpc-ingest/src/config.rs b/grpc-ingest/src/config.rs index 365552160..5d998bb4f 100644 --- a/grpc-ingest/src/config.rs +++ b/grpc-ingest/src/config.rs @@ -9,7 +9,6 @@ use { }, }; -pub const REDIS_STREAM_ACCOUNTS: &str = "ACCOUNTS"; pub const REDIS_STREAM_DATA_KEY: &str = "data"; pub async fn load(path: impl AsRef + Copy) -> anyhow::Result @@ -139,7 +138,6 @@ impl ConfigGrpc { #[derive(Debug, Clone, Deserialize)] pub struct ConfigGrpcAccounts { - #[serde(default = "ConfigGrpcAccounts::default_stream")] pub stream: String, #[serde( default = "ConfigGrpcAccounts::default_stream_maxlen", @@ -153,10 +151,6 @@ pub struct ConfigGrpcAccounts { } impl ConfigGrpcAccounts { - pub fn default_stream() -> String { - REDIS_STREAM_ACCOUNTS.to_owned() - } - pub const fn default_stream_maxlen() -> usize { 100_000_000 } @@ -232,6 +226,7 @@ pub struct ConfigIngester { pub redis: String, pub postgres: ConfigIngesterPostgres, pub download_metadata: ConfigIngesterDownloadMetadata, + pub snapshots: ConfigIngestStream, pub accounts: ConfigIngestStream, pub transactions: ConfigIngestStream, } @@ -320,10 +315,6 @@ impl ConfigIngesterDownloadMetadata { 10 } - pub fn default_stream() -> String { - REDIS_STREAM_METADATA_JSON.to_owned() - } - pub const fn default_stream_maxlen() -> usize { 10_000_000 } diff --git a/grpc-ingest/src/ingester.rs b/grpc-ingest/src/ingester.rs index fd40bab5b..000f747b4 100644 --- a/grpc-ingest/src/ingester.rs +++ b/grpc-ingest/src/ingester.rs @@ -142,7 +142,7 @@ pub async fn run(config: ConfigIngester) -> anyhow::Result<()> { }) .start()?; let snapshot_stream = IngestStream::build() - .config(config.accounts.clone()) + .config(config.snapshots.clone()) .connection(connection.clone()) .handler(move |info| { let pt_snapshots = Arc::clone(&pt_snapshots);