Handle int instead of hex signature values in pack from eth_tester

This commit is contained in:
lash
2022-03-01 14:43:43 +00:00
parent c954f4d1b4
commit 601db731d9
3 changed files with 19 additions and 2 deletions

View File

@@ -95,7 +95,11 @@ def pack(tx_src, chain_spec):
tx_src['r'],
tx_src['s'],
]:
for b in bytes.fromhex(strip_0x(a)):
try:
a = strip_0x(a)
except TypeError:
a = strip_0x(hex(a)) # believe it or not, eth_tester returns signatures as ints not hex
for b in bytes.fromhex(a):
signature[cursor] = b
cursor += 1