arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
Merge pull request #566 from hermeznetwork/fix/process-tx-runtime-error

fix possible runtime error
arnau 17317030+arnaucube@users.noreply.github.com
Tue, 23 Feb 2021 16:13:31 +0100
commit

9d08ec6978c4428e8d988ad8926b7bf287b90b5c

parent

ffda9fa1efbfa3372f08d9277a084a0f35cdf79e

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M batchbuilder/batchbuilder.go → batchbuilder/batchbuilder.go

@@ -64,7 +64,10 @@ bbStateDB := bb.localStateDB.StateDB

tp := txprocessor.NewTxProcessor(bbStateDB, configBatch.TxProcessorConfig) ptOut, err := tp.ProcessTxs(coordIdxs, l1usertxs, l1coordinatortxs, pooll2txs) - return ptOut.ZKInputs, tracerr.Wrap(err) + if err != nil { + return nil, tracerr.Wrap(err) + } + return ptOut.ZKInputs, nil } // LocalStateDB returns the underlying LocalStateDB