From eeb62be039927d461bcd5bebc456e3ab1a31307c Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 20 Aug 2020 00:27:32 -0400 Subject: move nonce to EVMOutput/Input --- plugin/evm/vm.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugin/evm/vm.go') diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index f62bc7b..38646c9 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -737,9 +737,14 @@ func (vm *VM) GetSpendableCanonical(keys []*crypto.PrivateKeySECP256K1R, amount if amount < balance { balance = amount } + nonce, err := vm.GetAcceptedNonce(addr) + if err != nil { + return nil, nil, err + } inputs = append(inputs, EVMInput{ Address: addr, Amount: balance, + Nonce: nonce, }) signers = append(signers, []*crypto.PrivateKeySECP256K1R{key}) amount -= balance -- cgit v1.2.3