mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Add semaphore for API queries to SQL
This commit is contained in:
@@ -29,7 +29,7 @@ func initTest(t *testing.T, chainID uint16, hermezContractAddr ethCommon.Address
|
||||
pass := os.Getenv("POSTGRES_PASS")
|
||||
db, err := dbUtils.InitSQLDB(5432, "localhost", "hermez", pass, "hermez")
|
||||
require.NoError(t, err)
|
||||
l2DB := l2db.NewL2DB(db, 10, 100, 24*time.Hour)
|
||||
l2DB := l2db.NewL2DB(db, 10, 100, 24*time.Hour, nil)
|
||||
|
||||
dir, err := ioutil.TempDir("", "tmpdb")
|
||||
require.NoError(t, err)
|
||||
@@ -105,7 +105,7 @@ func addTokens(t *testing.T, tc *til.Context, db *sqlx.DB) {
|
||||
})
|
||||
}
|
||||
|
||||
hdb := historydb.NewHistoryDB(db)
|
||||
hdb := historydb.NewHistoryDB(db, nil)
|
||||
assert.NoError(t, hdb.AddBlock(&common.Block{
|
||||
Num: 1,
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user