From eafb66ae16319e4c0cbe809b92590e08d1636bcd Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Thu, 27 Jan 2022 10:44:38 -0600 Subject: [PATCH] f - Don't serialize ProbabilisticScoringParameters --- lightning/src/routing/scoring.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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)?, -- 2.39.5