diff options
author | Determinant <[email protected]> | 2020-08-20 00:27:32 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-08-20 00:27:32 -0400 |
commit | eeb62be039927d461bcd5bebc456e3ab1a31307c (patch) | |
tree | d8419578e56c7e1d9ebdd76112966bab45f935ab /plugin/evm/export_tx.go | |
parent | 9f503c997bdb67a40ac2817c6cf0eb780a86f3c1 (diff) |
move nonce to EVMOutput/Input
Diffstat (limited to 'plugin/evm/export_tx.go')
-rw-r--r-- | plugin/evm/export_tx.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugin/evm/export_tx.go b/plugin/evm/export_tx.go index 9af11e0..423c754 100644 --- a/plugin/evm/export_tx.go +++ b/plugin/evm/export_tx.go @@ -33,8 +33,6 @@ type UnsignedExportTx struct { Ins []EVMInput `serialize:"true" json:"inputs"` // Outputs that are exported to the chain ExportedOutputs []*avax.TransferableOutput `serialize:"true" json:"exportedOutputs"` - // EVM nonce - nonce uint64 } // InputUTXOs returns an empty set @@ -157,10 +155,10 @@ func (tx *UnsignedExportTx) EVMStateTransfer(state *state.StateDB) error { return errInsufficientFunds } state.SubBalance(from.Address, amount) - if state.GetNonce(from.Address) != tx.nonce { + if state.GetNonce(from.Address) != from.Nonce { return errInvalidNonce } - state.SetNonce(from.Address, tx.nonce+1) + state.SetNonce(from.Address, from.Nonce+1) } return nil } |