From 895d70e79fb27c8a098aebfa86c88f4cc7668c42 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 5 Jan 2016 12:58:08 -0800 Subject: [PATCH] lnwallet: add funding tx p2sh output to lnchannel * Allows for quick access to the pkScript when signing new commitment transactions. --- lnwallet/channel.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lnwallet/channel.go b/lnwallet/channel.go index dacd0a54..7c3a1043 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -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 }