Skip to content

Commit

Permalink
Remove network method from new gen modules
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjw committed Jan 15, 2019
1 parent 79a5ea3 commit 122ba1a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
7 changes: 0 additions & 7 deletions tests/core/version-module/test_version_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def async_w3():
def test_blocking_version(blocking_w3):
assert blocking_w3.blocking_version.api == blocking_w3.legacy_version.api
assert blocking_w3.blocking_version.node == blocking_w3.legacy_version.node
assert blocking_w3.blocking_version.network == blocking_w3.legacy_version.network
assert blocking_w3.blocking_version.ethereum == blocking_w3.legacy_version.ethereum


Expand All @@ -48,12 +47,6 @@ async def test_async_blocking_version(async_w3, blocking_w3):
assert async_w3.async_version.api == blocking_w3.legacy_version.api

assert await async_w3.async_version.node == blocking_w3.legacy_version.node
with pytest.raises(
ValueError,
message="RPC Endpoint has not been implemented: net_version"
):
# net_version is provided through a middleware
assert await async_w3.async_version.network == blocking_w3.legacy_version.network
with pytest.raises(
ValueError,
message="RPC Endpoint has not been implemented: eth_protocolVersion"
Expand Down
9 changes: 0 additions & 9 deletions web3/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class BaseVersion(ModuleV2):
retrieve_caller_fn = None

_get_node_version = Method('web3_clientVersion')
_get_net_version = Method('net_version')
_get_protocol_version = Method('eth_protocolVersion')

@property
Expand All @@ -27,10 +26,6 @@ class AsyncVersion(BaseVersion):
async def node(self):
return await self._get_node_version()

@property
async def network(self):
return await self._get_net_version()

@property
async def ethereum(self):
return await self._get_protocol_version()
Expand All @@ -41,10 +36,6 @@ class BlockingVersion(BaseVersion):
def node(self):
return self._get_node_version()

@property
def network(self):
return self._get_net_version()

@property
def ethereum(self):
return self._get_protocol_version()
Expand Down

0 comments on commit 122ba1a

Please sign in to comment.