mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 21:04:11 +00:00
Use toCanonicalAddress in getSender
This commit is contained in:
parent
4e007e7d6c
commit
ae03675b07
@ -73,8 +73,7 @@ proc getSender(transaction: Transaction): EthAddress =
|
|||||||
txHash = transaction.hash # hash without signature
|
txHash = transaction.hash # hash without signature
|
||||||
sig = transaction.toSignature()
|
sig = transaction.toSignature()
|
||||||
pubKey = recoverKeyFromSignature(sig, txHash)
|
pubKey = recoverKeyFromSignature(sig, txHash)
|
||||||
const pubKeySize = 64
|
result = pubKey.toCanonicalAddress()
|
||||||
result[0..19] = pubKey.data[pubKeySize - 20 .. pubKeySize - 1]
|
|
||||||
|
|
||||||
template balance(addressDb: AccountStateDb, address: EthAddress): GasInt =
|
template balance(addressDb: AccountStateDb, address: EthAddress): GasInt =
|
||||||
# TODO: Account balance u256 but GasInt is int64?
|
# TODO: Account balance u256 but GasInt is int64?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user