diff options
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r-- | plugin/evm/vm.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index 87487ff..0910f6d 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -183,6 +183,7 @@ func (vm *VM) getAtomicTx(block *types.Block) *Tx { panic(err) } } + atx.Sign(vm.codec, nil) return atx } @@ -765,8 +766,12 @@ func (vm *VM) GetAtomicUTXOs( } func GetEthAddress(privKey *crypto.PrivateKeySECP256K1R) common.Address { + return PublicKeyToEthAddress(privKey.PublicKey()) +} + +func PublicKeyToEthAddress(pubKey crypto.PublicKey) common.Address { return ethcrypto.PubkeyToAddress( - (*privKey.PublicKey().(*crypto.PublicKeySECP256K1R).ToECDSA())) + (*pubKey.(*crypto.PublicKeySECP256K1R).ToECDSA())) } func (vm *VM) GetSpendableCanonical(keys []*crypto.PrivateKeySECP256K1R, amount uint64) ([]EVMInput, [][]*crypto.PrivateKeySECP256K1R, error) { |