Skip to content

Commit 2a3d0f7

Browse files
authored
Merge pull request #1379 from TheBlueMatt/2022-03-prob-scorer-fixes
[0.0.105-bindings] Trivial Bindings Cleanups
2 parents bf19429 + 9f1660e commit 2a3d0f7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,8 @@ impl PendingOutboundPayment {
878878
/// issues such as overly long function definitions. Note that the ChannelManager can take any
879879
/// type that implements KeysInterface for its keys manager, but this type alias chooses the
880880
/// concrete type of the KeysManager.
881+
///
882+
/// (C-not exported) as Arcs don't make sense in bindings
881883
pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<InMemorySigner, Arc<M>, Arc<T>, Arc<KeysManager>, Arc<F>, Arc<L>>;
882884

883885
/// SimpleRefChannelManager is a type alias for a ChannelManager reference, and is the reference
@@ -888,6 +890,8 @@ pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<InMemorySigner, Ar
888890
/// helps with issues such as long function definitions. Note that the ChannelManager can take any
889891
/// type that implements KeysInterface for its keys manager, but this type alias chooses the
890892
/// concrete type of the KeysManager.
893+
///
894+
/// (C-not exported) as Arcs don't make sense in bindings
891895
pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, M, T, F, L> = ChannelManager<InMemorySigner, &'a M, &'b T, &'c KeysManager, &'d F, &'e L>;
892896

893897
/// Manager which keeps track of a number of channels and sends messages to the appropriate

lightning/src/ln/peer_handler.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ struct PeerHolder<Descriptor: SocketDescriptor> {
376376
/// lifetimes). Other times you can afford a reference, which is more efficient, in which case
377377
/// SimpleRefPeerManager is the more appropriate type. Defining these type aliases prevents
378378
/// issues such as overly long function definitions.
379+
///
380+
/// (C-not exported) as Arcs don't make sense in bindings
379381
pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<SD, Arc<SimpleArcChannelManager<M, T, F, L>>, Arc<NetGraphMsgHandler<Arc<NetworkGraph>, Arc<C>, Arc<L>>>, Arc<L>, Arc<IgnoringMessageHandler>>;
380382

381383
/// SimpleRefPeerManager is a type alias for a PeerManager reference, and is the reference
@@ -384,6 +386,8 @@ pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<SD, Arc<SimpleArc
384386
/// usage of lightning-net-tokio (since tokio::spawn requires parameters with static lifetimes).
385387
/// But if this is not necessary, using a reference is more efficient. Defining these type aliases
386388
/// helps with issues such as long function definitions.
389+
///
390+
/// (C-not exported) as Arcs don't make sense in bindings
387391
pub type SimpleRefPeerManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, SD, M, T, F, C, L> = PeerManager<SD, SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, M, T, F, L>, &'e NetGraphMsgHandler<&'g NetworkGraph, &'h C, &'f L>, &'f L, IgnoringMessageHandler>;
388392

389393
/// A PeerManager manages a set of peers, described by their [`SocketDescriptor`] and marshalls

lightning/src/routing/scoring.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -844,11 +844,8 @@ impl<G: Deref<Target = NetworkGraph>, T: Time> Writeable for ProbabilisticScorer
844844
}
845845
}
846846

847-
impl<G, T> ReadableArgs<(ProbabilisticScoringParameters, G)> for ProbabilisticScorerUsingTime<G, T>
848-
where
849-
G: Deref<Target = NetworkGraph>,
850-
T: Time,
851-
{
847+
impl<G: Deref<Target = NetworkGraph>, T: Time>
848+
ReadableArgs<(ProbabilisticScoringParameters, G)> for ProbabilisticScorerUsingTime<G, T> {
852849
#[inline]
853850
fn read<R: Read>(
854851
r: &mut R, args: (ProbabilisticScoringParameters, G)

0 commit comments

Comments
 (0)