From 32ac44c78e32fb71f7b1e7feac17c7b99cc095c4 Mon Sep 17 00:00:00 2001 From: leonz789 Date: Thu, 12 Dec 2024 05:11:34 +0800 Subject: [PATCH] fix(oracle):open rounds on restart --- x/oracle/keeper/aggregator/context.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/oracle/keeper/aggregator/context.go b/x/oracle/keeper/aggregator/context.go index ed75b473..d9e1f4d5 100644 --- a/x/oracle/keeper/aggregator/context.go +++ b/x/oracle/keeper/aggregator/context.go @@ -303,12 +303,11 @@ func (agc *AggregatorContext) PrepareRoundEndBlock(block int64, forceSealed bool round.status = roundStatusClosed } else { round.status = roundStatusOpen - if forceSealed { - round.status = roundStatusClosed - } if left == 0 { // set nonce for corresponding feederID for new roud start newRoundFeederIDs = append(newRoundFeederIDs, feederIDUint64) + } else if forceSealed { + round.status = roundStatusClosed } } agc.rounds[feederIDUint64] = round