Use toCanonicalAddress in getSender

This commit is contained in:
coffeepots 2018-08-24 13:59:55 +01:00 committed by zah
parent 4e007e7d6c
commit ae03675b07
1 changed files with 1 additions and 2 deletions

View File

@ -73,8 +73,7 @@ proc getSender(transaction: Transaction): EthAddress =
txHash = transaction.hash # hash without signature
sig = transaction.toSignature()
pubKey = recoverKeyFromSignature(sig, txHash)
const pubKeySize = 64
result[0..19] = pubKey.data[pubKeySize - 20 .. pubKeySize - 1]
result = pubKey.toCanonicalAddress()
template balance(addressDb: AccountStateDb, address: EthAddress): GasInt =
# TODO: Account balance u256 but GasInt is int64?