File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,15 @@ def _execute(self, client: "Client"):
176176 if attempt > 0 and current_backoff < self ._max_backoff :
177177 current_backoff *= 2
178178
179- # Set the node account id to the client's node account id
180- node = client .network .current_node
181- self .node_account_id = node ._account_id
182-
179+ # Select preferred node if provided, fallback to client's default
180+ selected_node_account_id = (
181+ self ._select_node_account_id ()
182+ or client .network .current_node ._account_id
183+ )
184+
185+ self .node_account_id = selected_node_account_id
186+ node = client .network ._get_node (self .node_account_id )
187+
183188 # Create a channel wrapper from the client's channel
184189 channel = node ._get_channel ()
185190
Original file line number Diff line number Diff line change @@ -421,4 +421,5 @@ def _select_node_account_id(self) -> Optional[AccountId]:
421421 selected = self .node_account_ids [0 ]
422422 self ._used_node_account_id = selected
423423 return selected
424- return None
424+ return None
425+
You can’t perform that action at this time.
0 commit comments