@@ -524,18 +524,18 @@ func (env *environment) commitTransactions(transactions types.Transactions, gasP
524524
525525 err := env .commitTransaction (tx , proc )
526526 switch {
527- case core .IsNonceErr (err ) || core .IsInvalidTxErr (err ):
528- env .remove .Add (tx .Hash ())
529-
530- if glog .V (logger .Detail ) {
531- glog .Infof ("TX (%x) failed, will be removed: %v\n " , tx .Hash ().Bytes ()[:4 ], err )
532- }
533527 case state .IsGasLimitErr (err ):
534528 // ignore the transactor so no nonce errors will be thrown for this account
535529 // next time the worker is run, they'll be picked up again.
536530 env .ignoredTransactors .Add (from )
537531
538532 glog .V (logger .Detail ).Infof ("Gas limit reached for (%x) in this block. Continue to try smaller txs\n " , from [:4 ])
533+ case err != nil :
534+ env .remove .Add (tx .Hash ())
535+
536+ if glog .V (logger .Detail ) {
537+ glog .Infof ("TX (%x) failed, will be removed: %v\n " , tx .Hash ().Bytes ()[:4 ], err )
538+ }
539539 default :
540540 env .tcount ++
541541 }
@@ -545,7 +545,7 @@ func (env *environment) commitTransactions(transactions types.Transactions, gasP
545545func (env * environment ) commitTransaction (tx * types.Transaction , proc * core.BlockProcessor ) error {
546546 snap := env .state .Copy ()
547547 receipt , _ , err := proc .ApplyTransaction (env .coinbase , env .state , env .header , tx , env .header .GasUsed , true )
548- if err != nil && ( core . IsNonceErr ( err ) || state . IsGasLimitErr ( err ) || core . IsInvalidTxErr ( err )) {
548+ if err != nil {
549549 env .state .Set (snap )
550550 return err
551551 }
0 commit comments