TxSel integrated with L2DB, Add L1CoordTx creation

- GetL2TxSelection & GetL1L2TxSelection integrated with dbs
- Create L1CoordinatorTx of type CreateAccountDeposit when a L2
requires it (and the AccountCreationAuth exists)
This commit is contained in:
arnaucube
2020-09-15 11:30:34 +02:00
parent 2937bde4fa
commit 41715e47ba
10 changed files with 199 additions and 111 deletions

View File

@@ -65,6 +65,12 @@ func NewL2DB(
}, nil
}
// DB returns a pointer to the L2DB.db. This method should be used only for
// internal testing purposes.
func (l2db *L2DB) DB() *sqlx.DB {
return l2db.db
}
// AddTx inserts a tx into the L2DB
func (l2db *L2DB) AddTx(tx *common.PoolL2Tx) error {
return meddler.Insert(l2db.db, "tx_pool", tx)