diff --git a/src/bin/main.rs b/src/bin/main.rs index 72e88bd..5e28899 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -183,6 +183,9 @@ async fn handle_source_msg( } => { if aggregation_timestamp >= start_timestamp { for indexer_query in &data.indexer_queries { + if indexer_query.legacy_scalar.unwrap_or(false) { + continue; + } let key = IndexerFeesKey { signer: Address::from_slice(&data.receipt_signer)?, receiver: Address::from_slice(&indexer_query.indexer)?, diff --git a/src/messages.rs b/src/messages.rs index 474e57f..9ddac15 100644 --- a/src/messages.rs +++ b/src/messages.rs @@ -49,8 +49,8 @@ pub struct IndexerQueryProtobuf { pub indexer_errors: String, #[prost(uint64, tag = "11")] pub blocks_behind: u64, - #[prost(bool, tag = "12")] - pub legacy_scalar: bool, + #[prost(bool, optional, tag = "12")] + pub legacy_scalar: Option, } #[derive(prost::Message)]