Merge pull request #564 from hermeznetwork/feature/api-without-statedb

Stop using stateDB in API
This commit is contained in:
Eduard S
2021-02-23 15:22:53 +01:00
committed by GitHub
12 changed files with 119 additions and 134 deletions

View File

@@ -171,13 +171,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)
}