Test synchronizer reorg

This commit is contained in:
Eduard S
2020-11-11 16:46:13 +01:00
parent adedd77956
commit 457ff94bfa
6 changed files with 194 additions and 79 deletions

View File

@@ -729,8 +729,8 @@ func (hdb *HistoryDB) addAccounts(d meddler.DB, accounts []common.Account) error
)
}
// GetAccounts returns a list of accounts from the DB
func (hdb *HistoryDB) GetAccounts() ([]common.Account, error) {
// GetAllAccounts returns a list of accounts from the DB
func (hdb *HistoryDB) GetAllAccounts() ([]common.Account, error) {
var accs []*common.Account
err := meddler.QueryAll(
hdb.db, &accs,

View File

@@ -293,7 +293,7 @@ func TestAccounts(t *testing.T) {
err = historyDB.AddAccounts(accs)
assert.NoError(t, err)
// Fetch accounts
fetchedAccs, err := historyDB.GetAccounts()
fetchedAccs, err := historyDB.GetAllAccounts()
assert.NoError(t, err)
// Compare fetched accounts vs generated accounts
for i, acc := range fetchedAccs {