From 5645f897732b807f04b7c2ec8e25d4ae00450356 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 13 Jan 2023 13:45:19 -0800 Subject: [PATCH] actually filter on chain id --- web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs b/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs index 8129eac4..9d9e7170 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs @@ -123,6 +123,10 @@ impl RpcAccountingSubCommand { condition = condition.add(rpc_accounting::Column::PeriodDatetime.lte(end_timestamp)) } + if let Some(chain_id) = self.chain_id { + condition = condition.add(rpc_accounting::Column::ChainId.eq(chain_id)) + } + q = q.filter(condition); // TODO: make this work without into_json. i think we need to make a struct