Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move accountdb schema migration to trackerdb.go #2984

Merged
merged 2 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ledger/accountdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func accountsRound(tx *sql.Tx) (rnd basics.Round, hashrnd basics.Round, err erro
return
}

func accountsDbInit(r db.Queryable, w db.Queryable) (*accountsDbQueries, error) {
func accountsInitDbQueries(r db.Queryable, w db.Queryable) (*accountsDbQueries, error) {
var err error
qs := &accountsDbQueries{}

Expand Down
6 changes: 3 additions & 3 deletions ledger/accountdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func checkAccounts(t *testing.T, tx *sql.Tx, rnd basics.Round, accts map[basics.
require.NoError(t, err)
require.Equal(t, r, rnd)

aq, err := accountsDbInit(tx, tx)
aq, err := accountsInitDbQueries(tx, tx)
require.NoError(t, err)
defer aq.close()

Expand Down Expand Up @@ -804,7 +804,7 @@ func benchmarkReadingRandomBalances(b *testing.B, inMemory bool) {

accounts := benchmarkInitBalances(b, b.N, dbs, proto)

qs, err := accountsDbInit(dbs.Rdb.Handle, dbs.Wdb.Handle)
qs, err := accountsInitDbQueries(dbs.Rdb.Handle, dbs.Wdb.Handle)
require.NoError(b, err)

// read all the balances in the database, shuffled
Expand Down Expand Up @@ -1058,7 +1058,7 @@ func TestAccountsDbQueriesCreateClose(t *testing.T) {
return nil
})
require.NoError(t, err)
qs, err := accountsDbInit(dbs.Rdb.Handle, dbs.Wdb.Handle)
qs, err := accountsInitDbQueries(dbs.Rdb.Handle, dbs.Wdb.Handle)
require.NoError(t, err)
require.NotNil(t, qs.listCreatablesStmt)
qs.close()
Expand Down
Loading