From: Jeffrey Czyz Date: Thu, 27 Jan 2022 16:44:38 +0000 (-0600) Subject: f - Don't serialize ProbabilisticScoringParameters X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=eafb66ae16319e4c0cbe809b92590e08d1636bcd;p=rust-lightning f - Don't serialize ProbabilisticScoringParameters --- diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 82e52755c..100363b68 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -738,19 +738,21 @@ impl> Score for ProbabilisticScorer { impl> Writeable for ProbabilisticScorer { #[inline] fn write(&self, w: &mut W) -> Result<(), io::Error> { - self.params.write(w)?; self.channel_liquidities.write(w)?; write_tlv_fields!(w, {}); Ok(()) } } -impl> ReadableArgs<(&PublicKey, G)> for ProbabilisticScorer { +impl> ReadableArgs<(ProbabilisticScoringParameters, &PublicKey, G)> +for ProbabilisticScorer { #[inline] - fn read(r: &mut R, args: (&PublicKey, G)) -> Result { - let (node_pubkey, network_graph) = args; + fn read( + r: &mut R, args: (ProbabilisticScoringParameters, &PublicKey, G) + ) -> Result { + let (params, node_pubkey, network_graph) = args; let res = Ok(Self { - params: Readable::read(r)?, + params, node_id: NodeId::from_pubkey(node_pubkey), network_graph, channel_liquidities: Readable::read(r)?,