lightningd: struct uncommitted_channel for opening channels.

Each peer can have one 'uncommitted' channel, which is in the process
of opening.  This is used for openingd, and then on return we convert
it into a full-fledged struct channel and commit it into the database.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-02-19 11:36:02 +10:30
parent d2f691b288
commit 8db8c51201
7 changed files with 544 additions and 304 deletions

View File

@@ -2406,7 +2406,7 @@ class LightningDTests(BaseLightningDTests):
l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port'])
# We should get a message about reconnecting.
l2.daemon.wait_for_log('Peer has reconnected, state OPENINGD')
l2.daemon.wait_for_log('Peer reconnected, killing openingd')
# Should work fine.
l1.rpc.fundchannel(l2.info['id'], 20000)