Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions blockchain/vm/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var (
ErrMaxCodeSizeExceeded = errors.New("evm: max code size exceeded")
ErrInvalidJump = errors.New("evm: invalid jump destination")
ErrInvalidCode = errors.New("invalid code: must not begin with 0xef")
ErrNonceUintOverflow = errors.New("nonce uint64 overflow")

// errStopToken is an internal token indicating interpreter loop termination,
// never returned to outside callers.
Expand Down
4 changes: 4 additions & 0 deletions blockchain/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@ func (evm *EVM) create(caller types.ContractRef, codeAndHash *codeAndHash, gas u
if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) {
return nil, common.Address{}, gas, ErrInsufficientBalance // TODO-Klaytn-Issue615
}
nonce := evm.StateDB.GetNonce(caller.Address())
if nonce+1 < nonce {
return nil, common.Address{}, gas, ErrNonceUintOverflow
}
Comment thread
yoomee1313 marked this conversation as resolved.

// Increasing nonce since a failed tx with one of following error will be loaded on a block.
evm.StateDB.IncNonce(caller.Address())
Expand Down
Loading