mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
pytest: Added gossip test for new daemon
This commit is contained in:
committed by
Rusty Russell
parent
b4beab6537
commit
dc7b832e83
@@ -260,3 +260,15 @@ class LightningNode(object):
|
||||
return self.executor.submit(wait_connected)
|
||||
else:
|
||||
return wait_connected()
|
||||
|
||||
def openchannel(self, remote_node, capacity):
|
||||
addr = self.rpc.newaddr()['address']
|
||||
txid = self.bitcoin.rpc.sendtoaddress(addr, capacity / 10**6)
|
||||
tx = self.bitcoin.rpc.getrawtransaction(txid)
|
||||
self.rpc.addfunds(tx)
|
||||
self.rpc.fundchannel(remote_node.info['id'], capacity)
|
||||
self.daemon.wait_for_log('sendrawtx exit 0, gave')
|
||||
time.sleep(1)
|
||||
self.bitcoin.rpc.generate(6)
|
||||
self.daemon.wait_for_log('Normal operation')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user