From 72862147f3220e12ba5ebf1ad64ddddd3ff163b1 Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Mon, 22 Feb 2021 13:44:36 -0300 Subject: [PATCH] fix possible runtime error --- batchbuilder/batchbuilder.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/batchbuilder/batchbuilder.go b/batchbuilder/batchbuilder.go index ed57501..4a25da7 100644 --- a/batchbuilder/batchbuilder.go +++ b/batchbuilder/batchbuilder.go @@ -64,7 +64,10 @@ func (bb *BatchBuilder) BuildBatch(coordIdxs []common.Idx, configBatch *ConfigBa 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