Skip to content

Commit

Permalink
revert removal of token_network_registry_address cause it's needed
Browse files Browse the repository at this point in the history
  • Loading branch information
fredo committed Sep 20, 2021
1 parent 02d6878 commit c1e3189
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion raiden/network/rpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ def get_block(self, block_identifier: BlockIdentifier) -> BlockData:
"""Given a block number, query the chain to get its corresponding block hash"""
return self.web3.eth.getBlock(block_identifier)

def sync_nonce(self) -> None:
def _sync_nonce(self) -> None:
self._available_nonce = discover_next_available_nonce(
self.web3, self.eth_node, self.address
)
Expand Down
12 changes: 5 additions & 7 deletions raiden/tests/utils/smoketest.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@
CONTRACT_SERVICE_REGISTRY,
CONTRACT_TOKEN_NETWORK_REGISTRY,
CONTRACT_USER_DEPOSIT,
LIBRARY_TOKEN_NETWORK_UTILS,
LIBRARY_TOKEN_NETWORK_UTILS_LINK_KEY,
TEST_SETTLE_TIMEOUT_MAX,
TEST_SETTLE_TIMEOUT_MIN,
)
Expand Down Expand Up @@ -118,10 +116,8 @@ def __call__(self, description: str, error: bool = False) -> None:
...


def _deploy_contract(
deployer: ContractDeployer, name: str, args: list, libs: dict = None
) -> Address:
receipt = deployer.deploy(name, libs=libs, args=args)
def _deploy_contract(deployer: ContractDeployer, name: str, args: list) -> Address:
receipt = deployer.deploy(name, args=args)
address = receipt["contractAddress"]
assert address is not None, "must be a valid address"
return to_canonical_address(address)
Expand Down Expand Up @@ -167,6 +163,8 @@ def deploy_smoketest_contracts(
constructor_parameters=secret_registry_constructor_arguments,
)

token_network_registry_address = Address(to_canonical_address(contract_proxy.address))

service_registry_address = _deploy_contract(
deployer,
CONTRACT_SERVICE_REGISTRY,
Expand Down Expand Up @@ -204,7 +202,7 @@ def deploy_smoketest_contracts(
# Since the contracts have been deployed without the use of our
# JSONRPCClient, we need to sync the client's internal nonce so that
# it reflects the fact that we just sent 7 transactions.
client.sync_nonce()
client._sync_nonce()

proxy_manager = ProxyManager(
rpc_client=client,
Expand Down

0 comments on commit c1e3189

Please sign in to comment.