Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit a70b075

Browse files
vubvub
authored andcommitted
Modified python3 compatibility fix to make it also work with python2 for now
1 parent 6658f70 commit a70b075

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ethereum/state_transition.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
from ethereum.utils import normalize_address, hash32, trie_root, \
66
big_endian_int, address, int256, encode_int, \
7-
safe_ord, int_to_addr, sha3, big_endian_to_int
7+
safe_ord, int_to_addr, sha3, big_endian_to_int, \
8+
ascii_chr
89
from rlp.sedes import big_endian_int, Binary, binary, CountableList
910
from rlp.utils import decode_hex, encode_hex, ascii_chr
1011
from ethereum import utils
@@ -216,7 +217,7 @@ def apply_message(state, msg=None, **kwargs):
216217
assert not kwargs
217218
ext = VMExt(state, transactions.Transaction(0, 0, 21000, b'', 0, b''))
218219
result, gas_remained, data = apply_msg(ext, msg)
219-
return b''.join(map(lambda d: bytes([d]), data)) if result else None
220+
return b''.join(map(ascii_chr, data)) if result else None
220221

221222

222223
def apply_transaction(state, tx):

0 commit comments

Comments
 (0)