File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 1616 bitcoin.timelockdelta=33
1717 channels :
1818 - id :
19- block : 300
19+ block : 500
2020 index : 1
2121 target : tank-0004-ln
2222 capacity : 100000
3131 lnd :
3232 channels :
3333 - id :
34- block : 300
34+ block : 500
3535 index : 2
3636 target : tank-0005-ln
3737 capacity : 50000
Original file line number Diff line number Diff line change @@ -54,22 +54,16 @@ def setup_network(self):
5454 stream_command (f"warnet deploy { self .network_dir } " )
5555
5656 def fund_wallets (self ):
57- outputs = ""
5857 for ln in self .lns :
5958 addr = json .loads (self .warnet (f"ln rpc { ln } newaddress p2wkh" ))["address" ]
60- outputs += f',"{ addr } ":10'
61- # trim first comma
62- outputs = outputs [1 :]
63-
64- self .warnet ("bitcoin rpc tank-0000 sendmany '' '{" + outputs + "}'" )
65- self .warnet ("bitcoin rpc tank-0000 -generate 1" )
66-
67- def wait_for_two_txs (self ):
59+ self .warnet (f"bitcoin rpc tank-0000 sendtoaddress { addr } 10" )
6860 self .wait_for_predicate (
69- lambda : json .loads (self .warnet ("bitcoin rpc tank-0000 getmempoolinfo" ))["size" ] == 2
61+ lambda : json .loads (self .warnet ("bitcoin rpc tank-0000 getmempoolinfo" ))["size" ] == len ( self . lns )
7062 )
63+ self .warnet ("bitcoin rpc tank-0000 -generate 1" )
7164
7265 def manual_open_channels (self ):
66+ self .fund_wallets ()
7367 # 0 -> 1 -> 2
7468 pk1 = self .warnet ("ln pubkey tank-0001-ln" )
7569 pk2 = self .warnet ("ln pubkey tank-0002-ln" )
@@ -95,7 +89,9 @@ def manual_open_channels(self):
9589 )
9690 )
9791
98- self .wait_for_two_txs ()
92+ self .wait_for_predicate (
93+ lambda : json .loads (self .warnet ("bitcoin rpc tank-0000 getmempoolinfo" ))["size" ] == 2
94+ )
9995
10096 self .warnet ("bitcoin rpc tank-0000 -generate 10" )
10197
You can’t perform that action at this time.
0 commit comments