From a5b80ffc01821becffbe4f36d937f778c911af5f Mon Sep 17 00:00:00 2001 From: Aaron Buchwald Date: Tue, 6 Oct 2020 16:12:56 -0400 Subject: Add semantic verification tests for import tx --- plugin/evm/vm.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugin/evm/vm.go') 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 { -- cgit v1.2.3