Stop using stateDB in API

This commit is contained in:
arnaubennassar
2021-02-22 14:28:34 +01:00
parent df0cc32eed
commit c83047f527
12 changed files with 119 additions and 134 deletions

View File

@@ -170,13 +170,13 @@ func (a *API) verifyPoolL2TxWrite(txw *l2db.PoolL2TxWrite) error {
if err != nil {
return tracerr.Wrap(err)
}
// Get public key
account, err := a.s.LastGetAccount(poolTx.FromIdx)
// Validate feeAmount
_, err = common.CalcFeeAmount(poolTx.Amount, poolTx.Fee)
if err != nil {
return tracerr.Wrap(err)
}
// Validate feeAmount
_, err = common.CalcFeeAmount(poolTx.Amount, poolTx.Fee)
// Get public key
account, err := a.h.GetCommonAccountAPI(poolTx.FromIdx)
if err != nil {
return tracerr.Wrap(err)
}