diff --git a/snapshotter/modules/pooler/uniswapv2/aggregate/single_uniswap_trade_volume_24h.py b/snapshotter/modules/pooler/uniswapv2/aggregate/single_uniswap_trade_volume_24h.py index e6901bbf..c720d5ec 100644 --- a/snapshotter/modules/pooler/uniswapv2/aggregate/single_uniswap_trade_volume_24h.py +++ b/snapshotter/modules/pooler/uniswapv2/aggregate/single_uniswap_trade_volume_24h.py @@ -154,10 +154,15 @@ async def compute( msg_obj, redis, rpc_helper, anchor_rpc_helper, ipfs_reader, protocol_state_contract, project_id, ) - tail_epoch_id, _ = await get_tail_epoch_id( + tail_epoch_id, extrapolated_flag = await get_tail_epoch_id( redis, protocol_state_contract, anchor_rpc_helper, msg_obj.epochId, 86400, msg_obj.projectId, ) + if extrapolated_flag: + aggregate_complete_flag = False + else: + aggregate_complete_flag = True + if project_last_finalized_epoch <= tail_epoch_id: self._logger.error('last finalized epoch is too old, building aggregate from scratch') return await self._calculate_from_scratch( @@ -255,6 +260,7 @@ async def compute( snapshot = UniswapTradesSnapshot.parse_obj(snapshot_data) aggregate_snapshot = self._remove_aggregate_snapshot(aggregate_snapshot, snapshot) + if aggregate_complete_flag: aggregate_snapshot.complete = True else: aggregate_snapshot.complete = False