]> git.bitcoin.ninja Git - rust-lightning/commitdiff
f - Warn about calling features() in a hot code path
authorJeffrey Czyz <jkczyz@gmail.com>
Mon, 31 Jan 2022 23:23:49 +0000 (17:23 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 31 Jan 2022 23:23:49 +0000 (17:23 -0600)
lightning/src/routing/router.rs

index b1e24627d9e0c06fa4901088e12a069524b474d6..08f499fb751837bf4ef4921897e8227325cc84e3 100644 (file)
@@ -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(),