Skip to content

Commit

Permalink
Merge pull request #2 from algorandskiy/pavel/cce/lookup-all-resource…
Browse files Browse the repository at this point in the history
…s-fix

Make tests working
  • Loading branch information
cce authored Jan 4, 2022
2 parents 8f588bb + 6b04344 commit bfe3a38
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 141 deletions.
5 changes: 5 additions & 0 deletions cmd/catchpointdump/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,17 +295,22 @@ func printAccountsDatabase(databaseName string, fileHeader ledger.CatchpointFile
}
err = rows.Err()
} else {
acctCount := 0
acctCb := func(addr basics.Address, data basics.AccountData) {
err = printer(addr, data, progress)
if err != nil {
return
}
progress++
acctCount++
}
_, err = ledger.LoadAllFullAccounts(context.Background(), tx, balancesTable, resourcesTable, acctCb)
if err != nil {
return
}
if acctCount != int(rowsCount) {
return fmt.Errorf("expected %d accounts but got only %d", rowsCount, acctCount)
}
}

// increase the deadline warning to disable the warning message.
Expand Down
Loading

0 comments on commit bfe3a38

Please sign in to comment.