From f52b8370bc19a13c17540a53585eb577cad74c62 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 5 Jan 2016 16:30:06 -0800 Subject: [PATCH] lnwallet: populate the update totem during channel initialization --- lnwallet/channel.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 43b63802..0171be09 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -74,6 +74,9 @@ func newLightningChannel(wallet *LightningWallet, events *chainntnfs.ChainNotifi unfufilledPayments: make(map[PaymentHash]*PaymentRequest), } + // Populate the totem. + lc.updateTotem <- struct{}{} + fundingTxId := state.FundingTx.TxSha() fundingPkScript, err := scriptHashPkScript(state.FundingRedeemScript) if err != nil { @@ -436,7 +439,7 @@ func (lc *LightningChannel) SettleHTLC(rValue [20]byte, newRevocation [20]byte) lnChannel: lc, } - // TODO(roasbeef): such copy pasta, make into func + // TODO(roasbeef): such copy pasta, make into func... // Get next revocation hash, updating the number of updates in the // channel as a result. chanUpdate.currentUpdateNum = lc.channelState.NumUpdates