diff options
author | Aaron Buchwald <[email protected]> | 2020-10-06 16:12:56 -0400 |
---|---|---|
committer | Aaron Buchwald <[email protected]> | 2020-10-06 16:12:56 -0400 |
commit | a5b80ffc01821becffbe4f36d937f778c911af5f (patch) | |
tree | 801b7448bac78cb61ad12a2748796e55d7d0cdd6 /plugin/evm/vm.go | |
parent | d833a96a315eaf3385316c6cfc89a2c7b5f32c73 (diff) |
Add semantic verification tests for import tx
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r-- | plugin/evm/vm.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index 3ae3b12..4fbfe02 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -103,6 +103,7 @@ var ( errNoImportInputs = errors.New("tx has no imported inputs") errInputsNotSortedUnique = errors.New("inputs not sorted and unique") errPublicKeySignatureMismatch = errors.New("signature doesn't match public key") + errSignatureInputsMismatch = errors.New("number of inputs does not match number of signatures") errUnknownAsset = errors.New("unknown asset ID") errNoFunds = errors.New("no spendable funds were found") errWrongChainID = errors.New("tx has wrong chain ID") @@ -916,6 +917,7 @@ func (vm *VM) GetSpendableFunds(keys []*crypto.PrivateKeySECP256K1R, assetID ids return inputs, signers, nil } +// GetAcceptedNonce returns the nonce associated with the address at the last accepted block func (vm *VM) GetAcceptedNonce(address common.Address) (uint64, error) { state, err := vm.chain.BlockState(vm.lastAccepted.ethBlock) if err != nil { |