]> git.bitcoin.ninja Git - rust-lightning/commitdiff
XXX: Stuff we should revert but 2022-02-0.0.105-bindings-wip
authorMatt Corallo <git@bluematt.me>
Wed, 9 Feb 2022 21:50:53 +0000 (21:50 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 9 Feb 2022 21:50:53 +0000 (21:50 +0000)
lightning/src/routing/network_graph.rs
lightning/src/routing/scoring.rs

index ee310830afa93ee8e4bc55cccba603cf26897ac2..993dbe02940d24e13cad472afda39c55cc2145f7 100644 (file)
@@ -662,7 +662,7 @@ pub struct ChannelInfo {
 impl ChannelInfo {
        /// Returns a [`DirectedChannelInfo`] for the channel directed to the given `target` from a
        /// returned `source`, or `None` if `target` is not one of the channel's counterparties.
-       pub fn as_directed_to(&self, target: &NodeId) -> Option<(DirectedChannelInfo, &NodeId)> {
+       pub(crate) fn as_directed_to(&self, target: &NodeId) -> Option<(DirectedChannelInfo, &NodeId)> {
                let (direction, source) = {
                        if target == &self.node_one {
                                (self.two_to_one.as_ref(), &self.node_two)
index b02b61fa9f6c0381fe9fd7ffcad4eedd23656be5..540a6d3302ed7dd5444bb54d0bdbe13fc78a770d 100644 (file)
@@ -232,12 +232,10 @@ impl Score for FixedPenaltyScorer {
        since = "0.0.105",
        note = "ProbabilisticScorer should be used instead of Scorer.",
 )]
-pub type Scorer = ScorerUsingTime::<ConfiguredTime>;
-
 #[cfg(not(feature = "no-std"))]
-type ConfiguredTime = std::time::Instant;
+pub type Scorer = ScorerUsingTime::<std::time::Instant>;
 #[cfg(feature = "no-std")]
-type ConfiguredTime = time::Eternity;
+pub type Scorer = ScorerUsingTime::<time::Eternity>;
 
 // Note that ideally we'd hide ScorerUsingTime from public view by sealing it as well, but rustdoc
 // doesn't handle this well - instead exposing a `Scorer` which has no trait implementation(s) or
@@ -488,7 +486,10 @@ impl<T: Time> Readable for ChannelFailure<T> {
 /// behavior.
 ///
 /// [1]: https://arxiv.org/abs/2107.05322
-pub type ProbabilisticScorer<G> = ProbabilisticScorerUsingTime::<G, ConfiguredTime>;
+#[cfg(not(feature = "no-std"))]
+pub type ProbabilisticScorer<G> = ProbabilisticScorerUsingTime::<G, std::time::Instant>;
+#[cfg(feature = "no-std")]
+pub type ProbabilisticScorer<G> = ProbabilisticScorerUsingTime::<G, time::Eternity>;
 
 /// Probabilistic [`Score`] implementation.
 ///