Diferentiate SQL connections by read write

This commit is contained in:
arnaubennassar
2021-02-23 12:53:14 +01:00
parent 5b4cfac309
commit ed9bfdffa9
17 changed files with 259 additions and 191 deletions

View File

@@ -315,7 +315,7 @@ func newTestModules(t *testing.T) (*statedb.StateDB, *historydb.HistoryDB) {
pass := os.Getenv("POSTGRES_PASS")
db, err := dbUtils.InitSQLDB(5432, "localhost", "hermez", pass, "hermez")
require.NoError(t, err)
historyDB := historydb.NewHistoryDB(db, nil)
historyDB := historydb.NewHistoryDB(db, db, nil)
// Clear DB
test.WipeDB(historyDB.DB())