aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/vm.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r--plugin/evm/vm.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index 8823380..98ecb6f 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -175,6 +175,7 @@ func (vm *VM) getAtomicTx(block *types.Block) *Tx {
panic(err)
}
}
+ atx.Sign(vm.codec, nil)
return atx
}
@@ -719,8 +720,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) {