lnwallet: add funding tx p2sh output to lnchannel

* Allows for quick access to the pkScript when signing new commitment
transactions.
This commit is contained in:
Olaoluwa Osuntokun 2016-01-05 12:58:08 -08:00
parent 3fe82f475f
commit 895d70e79f

@ -46,6 +46,7 @@ type LightningChannel struct {
theirPendingCommitTx *wire.MsgTx
fundingTxIn *wire.TxIn
fundingP2SH []byte
// TODO(roasbeef): create and embed 'Service' interface w/ below?
started int32
@ -73,6 +74,7 @@ func newLightningChannel(wallet *LightningWallet, events *chainntnfs.ChainNotifi
}
_, multiSigIndex := findScriptOutputIndex(state.FundingTx, fundingPkScript)
lc.fundingTxIn = wire.NewTxIn(wire.NewOutPoint(&fundingTxId, multiSigIndex), nil)
lc.fundingP2SH = fundingPkScript
return lc, nil
}