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/vm.go | |
parent | 9f503c997bdb67a40ac2817c6cf0eb780a86f3c1 (diff) |
move nonce to EVMOutput/Input
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r-- | plugin/evm/vm.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 |