MCPcopy
hub / github.com/raiden-network/raiden / get_balance_for_node

Function get_balance_for_node

tools/debugging/stress_test_transfers.py:511–517  ·  view source on GitHub ↗
(url: URL)

Source from the content-addressed store, hash-verified

509
510
511def get_balance_for_node(url: URL) -> Dict[Address, TokenAmount]:
512 response = requests.get(f"{url}/api/v1/channels")
513 assert response.headers["Content-Type"] == "application/json", response.headers["Content-Type"]
514 assert response.status_code == HTTPStatus.OK, response.json()
515
516 response_data = response.json()
517 return {channel["partner_address"]: channel["balance"] for channel in response_data}
518
519
520def wait_for_balance(running_nodes: List[RunningNode]) -> None:

Callers 2

wait_for_balanceFunction · 0.85

Calls 2

jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected