Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions ledger/catchpointfilewriter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -905,11 +905,10 @@ func testExactAccountChunk(t *testing.T, proto protocol.ConsensusVersion, extraB
dl.fullBlock(&selfpay)
}

genR, _ := testCatchpointFlushRound(dl.generator)
valR, _ := testCatchpointFlushRound(dl.validator)
require.Equal(t, genR, valR)
require.EqualValues(t, BalancesPerCatchpointFileChunk-12+extraBlocks, genR)
testCatchpointFlushRound(dl.generator)
testCatchpointFlushRound(dl.validator)

// wait for the two ledgers to finish committing and be in sync
require.Eventually(t, func() bool {
dl.generator.accts.accountsMu.RLock()
dlg := len(dl.generator.accts.deltas)
Expand All @@ -920,6 +919,10 @@ func testExactAccountChunk(t *testing.T, proto protocol.ConsensusVersion, extraB
dl.validator.accts.accountsMu.RUnlock()
return dlg == dlv && dl.generator.Latest() == dl.validator.Latest()
}, 10*time.Second, 100*time.Millisecond)
genR, _ := dl.generator.LatestCommitted()
valR, _ := dl.validator.LatestCommitted()
require.Equal(t, genR, valR)
require.EqualValues(t, BalancesPerCatchpointFileChunk-12+extraBlocks, genR)

tempDir := t.TempDir()

Expand Down