From cde300077a3d420301fc86cfe8751da4a2edfbf8 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Wed, 10 Mar 2021 13:52:49 +0100 Subject: [PATCH] WIP temp fast fix, the final fix will be at: https://github.com/hermeznetwork/hermez-node/pull/617 --- txselector/txselector.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/txselector/txselector.go b/txselector/txselector.go index c4c27ef..1f876cd 100644 --- a/txselector/txselector.go +++ b/txselector/txselector.go @@ -418,8 +418,13 @@ func (txsel *TxSelector) getL1L2TxSelection(selectionConfig txprocessor.Config, // version of the TxSelector, we discard the L2Tx and // log the error, assuming that this will be iterated in // a near future. - return nil, nil, nil, nil, nil, nil, - tracerr.Wrap(fmt.Errorf("TxSelector: txprocessor.ProcessL2Tx: %w", err)) + log.Error(err) + // Discard L2Tx, and update Info parameter of the tx, + // and add it to the discardedTxs array + selectedL2Txs[i].Info = fmt.Sprintf("Tx not selected (in ProcessL2Tx) due to %s", err.Error()) + discardedL2Txs = append(discardedL2Txs, selectedL2Txs[i]) + noncesMap[selectedL2Txs[i].FromIdx]-- + continue } finalL2Txs = append(finalL2Txs, selectedL2Txs[i]) }