From 923f99a16fbea8da4aa6a93a401d8695a1c26f49 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Mon, 31 Jan 2022 17:23:49 -0600 Subject: [PATCH] f - Warn about calling features() in a hot code path --- lightning/src/routing/router.rs | 1 + 1 file changed, 1 insertion(+) 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(), -- 2.39.5