Hard-code scorer parameters to `ProbabilisticScoringFeeParameters`
[rust-lightning] / lightning-background-processor / src / lib.rs
index aa6d0b0615ef21e221e745e3563f1ddc9c2bf620..c9132133649633a49020965a9b1b9bef8688d50f 100644 (file)
@@ -899,6 +899,22 @@ mod tests {
        #[cfg(not(c_bindings))]
        type LockingWrapper<T> = Mutex<T>;
 
+       #[cfg(not(c_bindings))]
+       type ChannelManager =
+               channelmanager::ChannelManager<
+                       Arc<ChainMonitor>,
+                       Arc<test_utils::TestBroadcaster>,
+                       Arc<KeysManager>,
+                       Arc<KeysManager>,
+                       Arc<KeysManager>,
+                       Arc<test_utils::TestFeeEstimator>,
+                       Arc<DefaultRouter<
+                               Arc<NetworkGraph<Arc<test_utils::TestLogger>>>,
+                               Arc<test_utils::TestLogger>,
+                               Arc<LockingWrapper<TestScorer>>>
+                       >,
+                       Arc<test_utils::TestLogger>>;
+       #[cfg(c_bindings)]
        type ChannelManager =
                channelmanager::ChannelManager<
                        Arc<ChainMonitor>,
@@ -910,9 +926,7 @@ mod tests {
                        Arc<DefaultRouter<
                                Arc<NetworkGraph<Arc<test_utils::TestLogger>>>,
                                Arc<test_utils::TestLogger>,
-                               Arc<LockingWrapper<TestScorer>>,
-                               (),
-                               TestScorer>
+                               Arc<LockingWrapper<TestScorer>>>
                        >,
                        Arc<test_utils::TestLogger>>;
 
@@ -1069,9 +1083,10 @@ mod tests {
        }
 
        impl ScoreLookUp for TestScorer {
+               #[cfg(not(c_bindings))]
                type ScoreParams = ();
                fn channel_penalty_msat(
-                       &self, _short_channel_id: u64, _source: &NodeId, _target: &NodeId, _usage: ChannelUsage, _score_params: &Self::ScoreParams
+                       &self, _short_channel_id: u64, _source: &NodeId, _target: &NodeId, _usage: ChannelUsage, _score_params: &lightning::routing::scoring::ProbabilisticScoringFeeParameters
                ) -> u64 { unimplemented!(); }
        }