From 780828824916a6ff24e70d34f0a68a664db7aff5 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 31 Aug 2018 20:15:00 -0700 Subject: [PATCH] chanseries+server: populate ExtraOpaqueData field when reading from disk --- chan_series.go | 17 ++++++++++------- server.go | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/chan_series.go b/chan_series.go index 0088c7ec..ecc29ee2 100644 --- a/chan_series.go +++ b/chan_series.go @@ -159,13 +159,14 @@ func makeNodeAnn(n *channeldb.LightningNode) (*lnwire.NodeAnnouncement, error) { return nil, err } return &lnwire.NodeAnnouncement{ - Signature: wireSig, - Timestamp: uint32(n.LastUpdate.Unix()), - Addresses: n.Addresses, - NodeID: n.PubKeyBytes, - Features: n.Features.RawFeatureVector, - RGBColor: n.Color, - Alias: alias, + Signature: wireSig, + Timestamp: uint32(n.LastUpdate.Unix()), + Addresses: n.Addresses, + NodeID: n.PubKeyBytes, + Features: n.Features.RawFeatureVector, + RGBColor: n.Color, + Alias: alias, + ExtraOpaqueData: n.ExtraOpaqueData, }, nil } @@ -277,6 +278,7 @@ func (c *chanSeries) FetchChanUpdates(chain chainhash.Hash, HtlcMinimumMsat: e1.MinHTLC, BaseFee: uint32(e1.FeeBaseMSat), FeeRate: uint32(e1.FeeProportionalMillionths), + ExtraOpaqueData: e1.ExtraOpaqueData, } chanUpdate.Signature, err = lnwire.NewSigFromRawSignature(e1.SigBytes) if err != nil { @@ -295,6 +297,7 @@ func (c *chanSeries) FetchChanUpdates(chain chainhash.Hash, HtlcMinimumMsat: e2.MinHTLC, BaseFee: uint32(e2.FeeBaseMSat), FeeRate: uint32(e2.FeeProportionalMillionths), + ExtraOpaqueData: e1.ExtraOpaqueData, } chanUpdate.Signature, err = lnwire.NewSigFromRawSignature(e2.SigBytes) if err != nil { diff --git a/server.go b/server.go index 598cd7c3..36fcc484 100644 --- a/server.go +++ b/server.go @@ -3015,6 +3015,7 @@ func createChannelUpdate(info *channeldb.ChannelEdgeInfo, HtlcMinimumMsat: policy.MinHTLC, BaseFee: uint32(policy.FeeBaseMSat), FeeRate: uint32(policy.FeeProportionalMillionths), + ExtraOpaqueData: policy.ExtraOpaqueData, } var err error