diff --git a/src/dexorder/walker.py b/src/dexorder/walker.py index 00bfdbd..03577e0 100644 --- a/src/dexorder/walker.py +++ b/src/dexorder/walker.py @@ -77,10 +77,11 @@ class BlockWalker (BlockProgressor): promo_height = promotion_height(chain, latest.height) while (processed_height < promo_height and (config.walker_stop is None or processed_height < config.walker_stop)): - cur_height = min(promo_height, processed_height+batch_size-1) + start = processed_height + 1 + cur_height = min(promo_height, processed_height+batch_size) if config.walker_stop is not None: cur_height = min(cur_height, config.walker_stop) - await self.handle(processed_height+1, cur_height, chain=chain, w3=w3) + await self.handle(start, cur_height, chain=chain, w3=w3) if self.flush_delay is None or \ self.flush_type=='blocks' and last_flush + self.flush_delay <= processed_height or \ self.flush_type=='time' and last_flush + self.flush_delay <= now():