From 2724cfa95e36210127ca7a645e21a32678725485 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 29 Oct 2023 20:35:25 -0700 Subject: [PATCH] don't actually change get_logs this has its own edge case, but i need more tests before i trust the change --- web3_proxy/src/block_number.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/web3_proxy/src/block_number.rs b/web3_proxy/src/block_number.rs index dee6c0b2..f497b1a2 100644 --- a/web3_proxy/src/block_number.rs +++ b/web3_proxy/src/block_number.rs @@ -402,11 +402,12 @@ impl CacheMode { let (block_num, change) = BlockNumber_to_U64(block_num, head_block.number()); - if change { - // TODO: include the hash instead of the number? - trace!("changing fromBlock in eth_getLogs. {} -> {}", x, block_num); - *x = json!(block_num); - } + // TODO: double check this. it scares me + // if change { + // // TODO: include the hash instead of the number? + // trace!("changing fromBlock in eth_getLogs. {} -> {}", x, block_num); + // *x = json!(block_num); + // } BlockNumOrHash::Num(block_num) } else { @@ -425,10 +426,11 @@ impl CacheMode { let (block_num, change) = BlockNumber_to_U64(block_num, latest_block); - if change { - trace!("changing toBlock in eth_getLogs. {} -> {}", x, block_num); - *x = json!(block_num); - } + // TODO: double check this. it scares me + // if change { + // trace!("changing toBlock in eth_getLogs. {} -> {}", x, block_num); + // *x = json!(block_num); + // } if let Some(app) = app { // TODO: make a jsonrpc query here? cache rates will be better but it adds a network request