chanseries: fix panic bug by ensuring we access a non-nil edge

In this commit, we fix an existing but that would cause the daemon to at
times crash. Before this commit, we access the wrong edge, which would
possibly actually be nil, leading to a panic. In this commit we fix this
by ensuring we access the proper edge which is known to be non-nil at
this point in the control flow.
This commit is contained in:
Olaoluwa Osuntokun 2018-09-06 16:48:50 -07:00
parent fb95858afc
commit 09d4660524
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -297,7 +297,7 @@ func (c *chanSeries) FetchChanUpdates(chain chainhash.Hash,
HtlcMinimumMsat: e2.MinHTLC,
BaseFee: uint32(e2.FeeBaseMSat),
FeeRate: uint32(e2.FeeProportionalMillionths),
ExtraOpaqueData: e1.ExtraOpaqueData,
ExtraOpaqueData: e2.ExtraOpaqueData,
}
chanUpdate.Signature, err = lnwire.NewSigFromRawSignature(e2.SigBytes)
if err != nil {