From 3cf014ec4f6dac7110cd23870c5d315f9ebb35cd Mon Sep 17 00:00:00 2001 From: Dustin Xie Date: Sun, 16 Jun 2024 22:43:46 -0700 Subject: [PATCH] [workingset] remove action from actpool upon tx container error --- state/factory/workingset.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/state/factory/workingset.go b/state/factory/workingset.go index 5eaec73026..95ebe9efea 100644 --- a/state/factory/workingset.go +++ b/state/factory/workingset.go @@ -39,6 +39,7 @@ var ( ) errInvalidSystemActionLayout = errors.New("system action layout is invalid") + errUnfoldTxContainer = errors.New("failed to unfold tx container") ) func init() { @@ -161,7 +162,7 @@ func (ws *workingSet) runAction( if protocol.MustGetFeatureCtx(ctx).UseTxContainer { if container, ok := selp.Action().(action.TxContainer); ok { if err := container.Unfold(selp, ctx, ws.checkContract); err != nil { - return nil, errors.Wrapf(err, "Failed to unfold EVM tx inside the container") + return nil, errors.Wrap(errUnfoldTxContainer, err.Error()) } } } @@ -593,7 +594,7 @@ func (ws *workingSet) pickAndRunActions( // do nothing case action.ErrChainID: continue - case action.ErrGasLimit: + case action.ErrGasLimit, errUnfoldTxContainer: actionIterator.PopAccount() continue default: