diff --git a/consensus/consortium/common/contract.go b/consensus/consortium/common/contract.go index 94c8bb9919..b1f40b4834 100644 --- a/consensus/consortium/common/contract.go +++ b/consensus/consortium/common/contract.go @@ -349,6 +349,7 @@ func ApplyTransaction(msg types.Message, opts *ApplyTransactOpts) (err error) { *receivedTxs = (*receivedTxs)[1:] } opts.State.Prepare(expectedTx.Hash(), len(*txs)) + opts.State.SetNonce(msg.From(), nonce+1) gasUsed, err := applyMessage(opts.ApplyMessageOpts, expectedTx) if err != nil { failed = true @@ -378,7 +379,6 @@ func ApplyTransaction(msg types.Message, opts *ApplyTransactOpts) (err error) { receipt.BlockNumber = header.Number receipt.TransactionIndex = uint(opts.State.TxIndex()) *receipts = append(*receipts, receipt) - opts.State.SetNonce(msg.From(), nonce+1) return nil }