From: Jeffrey Czyz Date: Thu, 13 Jan 2022 23:58:14 +0000 (-0600) Subject: f - Don't serialize node id X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ed655bc16f45958a19e6544b4814de981c20623f;p=rust-lightning f - Don't serialize node id --- 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, {});