Skip to content

Commit f1a8b37

Browse files
committed
switch from print to logger
1 parent cda355b commit f1a8b37

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/ln_mixed_test.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ def wait_for_txs(self, count):
6464
def manual_open_channels(self):
6565
# 1 -> 4
6666
pk1 = self.warnet("ln pubkey tank-0004-lnd") # prefer -> self.node("tank-0004-lnd").uri()
67-
cln1_lnd4_channel = self.node("tank-0001-cln").channel(pk1, 444444, 200000, 5000)
68-
assert "txid" in cln1_lnd4_channel, "Failed to create channel between CLN and LND"
69-
print(cln1_lnd4_channel["txid"])
67+
channel = self.node("tank-0001-cln").channel(pk1, 444444, 200000, 5000)
68+
assert "txid" in channel, "Failed to create channel between CLN and LND"
69+
self.log.info(f'Channel txid {channel["txid"]}')
7070

7171
# 4 -> 2
72-
# lnd4_cln2_channel = self.node("tank-0004-lnd").channel(
72+
# channel = self.node("tank-0004-lnd").channel(
7373
# self.lns[1].uri(), 333333, 150000, 5000
7474
# )
75-
# assert "txid" in lnd4_cln2_channel, "Failed to create channel between LND and CLN"
76-
# print(lnd4_cln2_channel["txid"])
75+
# assert "txid" in channel, "Failed to create channel between LND and CLN"
76+
# self.log.info(f'Channel txid {channel["txid"]}')
7777

7878
self.wait_for_txs(1)
7979

@@ -84,18 +84,18 @@ def wait_for_gossip_sync(self, nodes, expected):
8484
for node in nodes:
8585
chs = node.graph()["edges"]
8686
if len(chs) >= expected:
87-
print(f"Too many edges for {node}")
87+
self.log.info(f"Too many edges for {node}")
8888
sleep(1)
8989

9090
def pay_invoice_rpc(self, sender: str, recipient: str):
91-
print("pay invoice using ln rpc")
91+
self.log.info("pay invoice using ln rpc")
9292
init_balance = self.node(recipient).channelbalance()
93-
print("initial balance", init_balance)
93+
self.log.info(f"initial balance {init_balance}")
9494
# create cln invoice
9595
inv = json.loads(self.warnet(f"ln rpc {recipient} invoice 1000000 label description"))
96-
print(inv)
96+
self.log.info(inv)
9797
# pay from lightning
98-
print(self.warnet(f"ln rpc {sender} payinvoice -f {inv['bolt11']}"))
98+
self.log.info(self.warnet(f"ln rpc {sender} payinvoice -f {inv['bolt11']}"))
9999

100100
def wait_for_success():
101101
return self.node(recipient).channelbalance() == init_balance + 1000

0 commit comments

Comments
 (0)