@@ -1207,8 +1207,8 @@ def test_ecrecover():
1207
1207
signature = pk .ecdsa_recoverable_serialize (
1208
1208
pk .ecdsa_sign_recoverable (msghash , raw = True )
1209
1209
)
1210
- signature = signature [0 ] + chr ( signature [1 ])
1211
- V = ord (signature [64 ]) + 27
1210
+ signature = signature [0 ] + utils . bytearray_to_bytestr ([ signature [1 ] ])
1211
+ V = utils . safe_ord (signature [64 ]) + 27
1212
1212
R = big_endian_to_int (signature [0 :32 ])
1213
1213
S = big_endian_to_int (signature [32 :64 ])
1214
1214
@@ -1629,9 +1629,15 @@ def test_string_logging():
1629
1629
o = []
1630
1630
s .block .log_listeners .append (lambda x : o .append (c .translator .listen (x )))
1631
1631
c .moo ()
1632
- assert o == [{"_event_type" : "foo" , "x" : "bob" , "__hash_x" : utils .sha3 ("bob" ),
1633
- "y" : "cow" , "__hash_y" : utils .sha3 ("cow" ), "z" : "dog" ,
1634
- "__hash_z" : utils .sha3 ("dog" )}]
1632
+ assert o == [{
1633
+ "_event_type" : b"foo" ,
1634
+ "x" : b"bob" ,
1635
+ "__hash_x" : utils .sha3 (b"bob" ),
1636
+ "y" : b"cow" ,
1637
+ "__hash_y" : utils .sha3 (b"cow" ),
1638
+ "z" : b"dog" ,
1639
+ "__hash_z" : utils .sha3 (b"dog" ),
1640
+ }]
1635
1641
1636
1642
1637
1643
params_code = """
@@ -1654,7 +1660,7 @@ def test_params_contract():
1654
1660
s = tester .state ()
1655
1661
c = s .abi_contract (params_code , FOO = 4 , BAR = 'horse' )
1656
1662
assert c .garble () == 4
1657
- assert c .marble () == 'horse'
1663
+ assert c .marble () == b 'horse'
1658
1664
1659
1665
prefix_types_in_functions_code = """
1660
1666
type fixedp: fp_
0 commit comments