@@ -905,11 +905,10 @@ func testExactAccountChunk(t *testing.T, proto protocol.ConsensusVersion, extraB
905
905
dl .fullBlock (& selfpay )
906
906
}
907
907
908
- genR , _ := testCatchpointFlushRound (dl .generator )
909
- valR , _ := testCatchpointFlushRound (dl .validator )
910
- require .Equal (t , genR , valR )
911
- require .EqualValues (t , BalancesPerCatchpointFileChunk - 12 + extraBlocks , genR )
908
+ testCatchpointFlushRound (dl .generator )
909
+ testCatchpointFlushRound (dl .validator )
912
910
911
+ // wait for the two ledgers to finish committing and be in sync
913
912
require .Eventually (t , func () bool {
914
913
dl .generator .accts .accountsMu .RLock ()
915
914
dlg := len (dl .generator .accts .deltas )
@@ -920,6 +919,10 @@ func testExactAccountChunk(t *testing.T, proto protocol.ConsensusVersion, extraB
920
919
dl .validator .accts .accountsMu .RUnlock ()
921
920
return dlg == dlv && dl .generator .Latest () == dl .validator .Latest ()
922
921
}, 10 * time .Second , 100 * time .Millisecond )
922
+ genR , _ := dl .generator .LatestCommitted ()
923
+ valR , _ := dl .validator .LatestCommitted ()
924
+ require .Equal (t , genR , valR )
925
+ require .EqualValues (t , BalancesPerCatchpointFileChunk - 12 + extraBlocks , genR )
923
926
924
927
tempDir := t .TempDir ()
925
928
0 commit comments