File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
contrib/pyln-testing/pyln/testing Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -662,12 +662,20 @@ def __init__(
662662 if SUBDAEMON :
663663 assert node_id > 0
664664 subdaemons = SUBDAEMON .split (',' )
665- if node_id > len (subdaemons ):
665+ # VLS_SERIAL_SELECT "swaps" the selected item with the first item
666+ select = env ("VLS_SERIAL_SELECT" , '1' )
667+ if node_id == int (select ):
668+ ndx = 1
669+ elif node_id == 1 :
670+ ndx = int (select )
671+ else :
672+ ndx = node_id
673+ if ndx > len (subdaemons ):
666674 # use the last element if not as many specifiers as nodes
667675 opts ['subdaemon' ] = subdaemons [- 1 ]
668676 else :
669677 # use the matching specifier
670- opts ['subdaemon' ] = subdaemons [node_id - 1 ]
678+ opts ['subdaemon' ] = subdaemons [ndx - 1 ]
671679
672680 print (f"starting node { node_id } with subdaemon { opts ['subdaemon' ]} " )
673681 if SUBDAEMON == 'hsmd:remote_hsmd' :
You can’t perform that action at this time.
0 commit comments