From ed655bc16f45958a19e6544b4814de981c20623f Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Thu, 13 Jan 2022 17:58:14 -0600 Subject: [PATCH] f - Don't serialize node id --- lightning/src/routing/scoring.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 51397cdae..9e2f8132e 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -747,20 +747,20 @@ impl> Writeable for ProbabilisticScorer { #[inline] fn write(&self, w: &mut W) -> Result<(), io::Error> { self.params.write(w)?; - self.node_id.write(w)?; self.channel_liquidities.write(w)?; write_tlv_fields!(w, {}); Ok(()) } } -impl> ReadableArgs for ProbabilisticScorer { +impl> ReadableArgs<(&PublicKey, G)> for ProbabilisticScorer { #[inline] - fn read(r: &mut R, args: G) -> Result { + fn read(r: &mut R, args: (&PublicKey, G)) -> Result { + let (node_pubkey, network_graph) = args; let res = Ok(Self { params: Readable::read(r)?, - node_id: Readable::read(r)?, - network_graph: args, + node_id: NodeId::from_pubkey(node_pubkey), + network_graph, channel_liquidities: Readable::read(r)?, }); read_tlv_fields!(r, {}); -- 2.39.5