arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
fix possible runtime error
Danilo Pantani danpantani@gmail.com
Mon, 22 Feb 2021 13:44:36 -0300
commit

72862147f3220e12ba5ebf1ad64ddddd3ff163b1

parent

df0cc32eed0fcad9fe6c744efb8169476ff16334

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