Skip to content

Commit

Permalink
Add server_id logic to client ADDNODES
Browse files Browse the repository at this point in the history
  • Loading branch information
jooste committed Sep 28, 2023
1 parent 2da757c commit bddcb74
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bluesky/network/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,12 @@ def actnode(self, newact=None):

return self.act_id

def addnodes(self, count=1, *node_ids):
''' Tell the server to add 'count' nodes.
def addnodes(self, count=1, *node_ids, server_id=None):
''' Tell the specified server to add 'count' nodes.
If provided, create these nodes with the specified node ids.
If no server_id is specified, the corresponding server of the
currently-active node is targeted.
'''
self.send(b'ADDNODES', dict(count=count, node_ids=node_ids))# TODO: get server_id in
self.send(b'ADDNODES', dict(count=count, node_ids=node_ids), server_id or genid(self.act_id[:-1], seqidx=0))

0 comments on commit bddcb74

Please sign in to comment.