fix sha3 stuff

This commit is contained in:
Piper Merriam 2016-07-11 00:00:20 -06:00
parent b034d7d871
commit 7c38b8f5ec
2 changed files with 4 additions and 6 deletions

View File

@ -1,7 +1,7 @@
pytest>=2.8.2
pytest-pythonpath>=0.3
tox>=1.8.0
eth-testrpc==0.4.1
eth-testrpc==0.4.2
py-geth>=0.5.0
# Until pyethereum > 1.3.6 is released.
https://github.com/ethereum/pyethereum/tarball/b06829e56e2a3de5276077a611ed8813b6cf5e74

View File

@ -90,13 +90,11 @@ class Web3(object):
def reset(self, keepIsSyncing):
self._requestManager.reset(keepIsSyncing)
def sha3(self, value, encoding=None):
if encoding is None:
hex_string = encode_hex(value)
elif encoding == 'hex':
def sha3(self, value, encoding="hex"):
if encoding == 'hex':
hex_string = value
else:
raise ValueError("Unsupported encoding")
hex_string = encode_hex(value)
return self._requestManager.request_blocking('web3_sha3', [hex_string])
def isConnected(self):