Skip to content

Commit 6bee9bf

Browse files
committed
f also test in fuzzing
1 parent 0504a2b commit 6bee9bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/routing/router.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ struct PathBuildingHop {
206206
/// decrease as well. Thus, we have to explicitly track which nodes have been processed and
207207
/// avoid processing them again.
208208
was_processed: bool,
209-
#[cfg(test)]
209+
#[cfg(any(test, feature = "fuzztarget"))]
210210
// In tests, we apply further sanity checks on cases where we skip nodes we already processed
211211
// to ensure it is specifically in cases where the fee has gone down because of a decrease in
212212
// value_contribution_msat, which requires tracking it here. See comments below where it is
@@ -628,7 +628,7 @@ pub fn get_route<L: Deref>(our_node_id: &PublicKey, network: &NetworkGraph, paye
628628
htlc_minimum_msat: $directional_info.htlc_minimum_msat,
629629
path_htlc_minimum_msat,
630630
was_processed: false,
631-
#[cfg(test)]
631+
#[cfg(any(test, feature = "fuzztarget"))]
632632
value_contribution_msat,
633633
}
634634
});
@@ -721,12 +721,12 @@ pub fn get_route<L: Deref>(our_node_id: &PublicKey, network: &NetworkGraph, paye
721721
old_entry.channel_fees = $directional_info.fees;
722722
old_entry.htlc_minimum_msat = $directional_info.htlc_minimum_msat;
723723
old_entry.path_htlc_minimum_msat = path_htlc_minimum_msat;
724-
#[cfg(test)]
724+
#[cfg(any(test, feature = "fuzztarget"))]
725725
{
726726
old_entry.value_contribution_msat = value_contribution_msat;
727727
}
728728
} else if old_entry.was_processed && new_cost < old_cost {
729-
#[cfg(test)]
729+
#[cfg(any(test, feature = "fuzztarget"))]
730730
{
731731
// If we're skipping processing a node which was previously
732732
// processed even though we found another path to it with a

0 commit comments

Comments
 (0)