Fix strange unicode encoding bug
This commit is contained in:
parent
babb9c0c70
commit
e40b3123e8
|
@ -326,6 +326,8 @@ def ser_uint256(u):
|
|||
return rs
|
||||
|
||||
def sha256(x):
|
||||
if isinstance(x, str):
|
||||
x = x.encode('utf8')
|
||||
return bytes(hashlib.sha256(x).digest())
|
||||
|
||||
def Hash(x):
|
||||
|
|
Loading…
Reference in New Issue