mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 21:04:11 +00:00
Alternative form of getSender that raises and returns address
This commit is contained in:
parent
ffa5aafab4
commit
bdb1904fd5
@ -58,3 +58,7 @@ proc getSender*(transaction: Transaction, output: var EthAddress): bool =
|
||||
output = pubKey.toCanonicalAddress()
|
||||
result = true
|
||||
|
||||
proc getSender*(transaction: Transaction): EthAddress =
|
||||
## Raises error on failure to recover public key
|
||||
if not transaction.getSender(result):
|
||||
raise newException(ValidationError, "Could not derive sender address from transaction")
|
||||
|
Loading…
x
Reference in New Issue
Block a user