hermez-node/test/l2db.go
test/l2db.goRaw
1package test
2
3import "github.com/jmoiron/sqlx"
4
5// CleanL2DB deletes 'tx_pool' and 'account_creation_auth' from the given DB
6func CleanL2DB(db *sqlx.DB) {
7 if _, err := db.Exec("DELETE FROM tx_pool"); err != nil {
8 panic(err)
9 }
10 if _, err := db.Exec("DELETE FROM account_creation_auth"); err != nil {
11 panic(err)
12 }
13}