Skip to content

Commit e092f16

Browse files
committed
fix(test): fix live test for kyoto module
1 parent ec4aa04 commit e092f16

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

bdk-python/tests/test_live_kyoto.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from bdkpython import *
1+
from bdkpython import Connection, Client, Network, Descriptor, KeychainKind, LightClientBuilder, LightClient, LightNode, IpAddress, ScanType, Peer, Update, Wallet
22
import unittest
33
import os
44
import asyncio
@@ -39,10 +39,16 @@ async def testKyoto(self) -> None:
3939
light_client: LightClient = LightClientBuilder().scan_type(ScanType.NEW()).peers(peers).connections(1).build(wallet)
4040
client: Client = light_client.client
4141
node: LightNode = light_client.node
42+
async def log_loop(client: Client):
43+
while True:
44+
log = await client.next_log()
45+
print(log)
46+
log_task = asyncio.create_task(log_loop(client))
4247
node.run()
43-
update: Update = await client.update()
48+
update: Update | None = await client.update()
4449
self.assertIsNotNone(update, "Update is None. This should not be possible.")
45-
wallet.apply_update(update)
50+
if update is not None:
51+
wallet.apply_update(update)
4652
self.assertGreater(
4753
wallet.balance().total.to_sat(),
4854
0,

0 commit comments

Comments
 (0)