From: Jeffrey Czyz Date: Mon, 31 Jan 2022 23:23:49 +0000 (-0600) Subject: f - Warn about calling features() in a hot code path X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=923f99a16fbea8da4aa6a93a401d8695a1c26f49;p=rust-lightning f - Warn about calling features() in a hot code path --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index b1e24627d..08f499fb7 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -373,6 +373,7 @@ impl<'a> CandidateRouteHop<'a> { } } + // NOTE: This may copy bytes to so avoid calling it in a hot code path. fn features(&self) -> ChannelFeatures { match self { CandidateRouteHop::FirstHop { details } => details.counterparty.features.to_context(),