Merge branch 'lash/normalize-verify-sig' into 'master'
refactor: Normalize signature verification See merge request chaintool/chainlib-eth!9
This commit is contained in:
commit
2011ce8bb8
@ -5,6 +5,7 @@ import logging
|
||||
# external imports
|
||||
import eth_tester
|
||||
import coincurve
|
||||
from chainlib.encode import TxHexNormalizer
|
||||
from chainlib.connection import (
|
||||
RPCConnection,
|
||||
error_parser,
|
||||
@ -184,7 +185,8 @@ class TestRPCConnection(RPCConnection):
|
||||
pk_bytes = self.backend.keystore.get(tx.sender)
|
||||
pk = coincurve.PrivateKey(secret=pk_bytes)
|
||||
result_address = private_key_to_address(pk)
|
||||
assert strip_0x(result_address) == strip_0x(tx.sender)
|
||||
tx_normalize = TxHexNormalizer()
|
||||
assert tx_normalize.wallet_address(strip_0x(result_address)) == tx_normalize.wallet_address(strip_0x(tx.sender))
|
||||
|
||||
|
||||
def sign_transaction(self, tx, passphrase=''):
|
||||
|
@ -3,5 +3,5 @@ pysha3==1.0.2
|
||||
hexathon~=0.0.1a8
|
||||
websocket-client==0.57.0
|
||||
potaahto~=0.0.1a1
|
||||
chainlib==0.0.9a10
|
||||
chainlib==0.0.9rc1
|
||||
confini>=0.4.1a1,<0.5.0
|
||||
|
Loading…
Reference in New Issue
Block a user