File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,21 @@ def _select_node(self) -> _Node:
171171 self ._node_index = (self ._node_index + 1 ) % len (self .nodes )
172172 self .current_node = self .nodes [self ._node_index ]
173173 return self .current_node
174+
175+ def _get_node (self , account_id : AccountId ) -> Optional [_Node ]:
176+ """
177+ Get a node matching the given account ID.
178+
179+ Args:
180+ account_id (AccountId): The account ID of the node to locate.
181+
182+ Returns:
183+ Optional[_Node]: The matching node, or None if not found.
184+ """
185+ for node in self .nodes :
186+ if node ._account_id == account_id :
187+ return node
188+ return None
174189
175190 def get_mirror_address (self ) -> str :
176191 """
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ def _execute(self, client: "Client"):
183183 )
184184
185185 self .node_account_id = selected_node_account_id
186- node = client .network ._select_node (self .node_account_id )
186+ node = client .network ._get_node (self .node_account_id )
187187
188188 # Create a channel wrapper from the client's channel
189189 channel = node ._get_channel ()
You can’t perform that action at this time.
0 commit comments