mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-17 13:06:14 +02:00
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:
parent
3fe82f475f
commit
895d70e79f
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue