@@ -524,18 +524,18 @@ func (env *environment) commitTransactions(transactions types.Transactions, gasP
524
524
525
525
err := env .commitTransaction (tx , proc )
526
526
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
- }
533
527
case state .IsGasLimitErr (err ):
534
528
// ignore the transactor so no nonce errors will be thrown for this account
535
529
// next time the worker is run, they'll be picked up again.
536
530
env .ignoredTransactors .Add (from )
537
531
538
532
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
+ }
539
539
default :
540
540
env .tcount ++
541
541
}
@@ -545,7 +545,7 @@ func (env *environment) commitTransactions(transactions types.Transactions, gasP
545
545
func (env * environment ) commitTransaction (tx * types.Transaction , proc * core.BlockProcessor ) error {
546
546
snap := env .state .Copy ()
547
547
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 {
549
549
env .state .Set (snap )
550
550
return err
551
551
}
0 commit comments