aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test/consensus_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integration_test/consensus_test.go')
-rw-r--r--integration_test/consensus_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/integration_test/consensus_test.go b/integration_test/consensus_test.go
index 08a1d10..2680cd2 100644
--- a/integration_test/consensus_test.go
+++ b/integration_test/consensus_test.go
@@ -145,8 +145,13 @@ func (s *ConsensusTestSuite) syncBlocksWithSomeNode(
syncNode.gov.CatchUpWithRound(
b.Position.Round + core.ConfigRoundShift)
}
- syncedCon, err = syncerObj.SyncBlocks(compactionChainBlocks, true)
- if syncedCon != nil || err != nil {
+ var synced bool
+ synced, err = syncerObj.SyncBlocks(compactionChainBlocks, true)
+ if err != nil {
+ done = true
+ }
+ if synced {
+ syncedCon, err = syncerObj.GetSyncedConsensus()
done = true
}
compactionChainBlocks = nil