lnd: introduce the fundingManager

This commit introduces the fundingManger which is used as a bridge
between the wallet’s internal ‘ChannelReservation’ workflow, and the
wire protocol’s funding messages.

 The funding manger is responsible for progressing the workflow, and
communicating any errors generated during the workflow back to the
source peer.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-06-21 13:13:49 -07:00
1 parent 25577b6cd5
commit 31e5466692
2 files changed
+608 -1

No files matched your search

+1 -1
View File
@@ -794,7 +794,7 @@ func (l *LightningWallet) handleContributionMsg(req *addContributionMsg) {
// since the outputs are cannonically sorted. If this is a sigle funder
// workflow, then we'll also need to send this to the remote node.
fundingTxID := fundingTx.TxSha()
found, multiSigIndex := findScriptOutputIndex(fundingTx, multiSigOut.PkScript)
_, multiSigIndex := findScriptOutputIndex(fundingTx, multiSigOut.PkScript)
fundingOutpoint := wire.NewOutPoint(&fundingTxID, multiSigIndex)
pendingReservation.partialState.FundingOutpoint = fundingOutpoint