From e9c7e8743eae27108ef9dba50e47699fcff6dc6d Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sat, 21 Dec 2024 03:50:00 -0400 Subject: [PATCH] fix: cast blocks as hex when splitting trace_filter batch (#170) --- eth_portfolio/_ledgers/address.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth_portfolio/_ledgers/address.py b/eth_portfolio/_ledgers/address.py index abf519da..6a190028 100644 --- a/eth_portfolio/_ledgers/address.py +++ b/eth_portfolio/_ledgers/address.py @@ -568,8 +568,8 @@ async def _trace_filter(fromBlock: int, toBlock: int, **kwargs) -> List[FilterTr halfway = from_block + chunk_size results = await gather( - _trace_filter(fromBlock=fromBlock, toBlock=halfway, **kwargs), - _trace_filter(fromBlock=halfway + 1, toBlock=toBlock, **kwargs), + _trace_filter(fromBlock=fromBlock, toBlock=hex(halfway), **kwargs), + _trace_filter(fromBlock=hex(halfway + 1), toBlock=toBlock, **kwargs), ) return results[0] + results[1]