fundingmanager: move final funding steps from wallet to funding manager.

Once a channel funding process has advanced to the point of broadcasting
the funding transaction, the state of the channel should be persisted
so that the nodes can disconnect or go down without having to wait for the
funding transaction to be confirmed on the blockchain.

Previously, the finalization of the funding process was handled by a
combination of the funding manager, the peer and the wallet, but if
the remote peer is no longer online or no longer connected, this flow
will no longer work. This commit moves all funding steps following
the transaction broadcast into the funding manager, which is available
as long as the daemon is running.
This commit is contained in:
bryanvu authored and Olaoluwa Osuntokun committed 2017-02-24 11:37:33 -08:00
1 parent 508138f8c8
commit e549a3f0ed
10 files changed
+402 -512

No files matched your search

+1
View File
@@ -199,6 +199,7 @@ func newServer(listenAddrs []string, notifier chainntnfs.ChainNotifier,
s.fundingMgr, err = newFundingManager(fundingConfig{
Wallet: wallet,
Notifier: s.chainNotifier,
ArbiterChan: s.breachArbiter.newContracts,
SendToPeer: s.sendToPeer,
FindPeer: s.findPeer,