Skip to content

Commit cb1d795

Browse files
authored
Merge pull request #1374 from TheBlueMatt/2022-03-bindings-cleanups
Trivial Bindings Cleanups
2 parents 74b9c1a + 5588f2f commit cb1d795

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
@@ -887,6 +887,8 @@ impl PendingOutboundPayment {
887887
/// issues such as overly long function definitions. Note that the ChannelManager can take any
888888
/// type that implements KeysInterface for its keys manager, but this type alias chooses the
889889
/// concrete type of the KeysManager.
890+
///
891+
/// (C-not exported) as Arcs don't make sense in bindings
890892
pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<InMemorySigner, Arc<M>, Arc<T>, Arc<KeysManager>, Arc<F>, Arc<L>>;
891893

892894
/// SimpleRefChannelManager is a type alias for a ChannelManager reference, and is the reference
@@ -897,6 +899,8 @@ pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<InMemorySigner, Ar
897899
/// helps with issues such as long function definitions. Note that the ChannelManager can take any
898900
/// type that implements KeysInterface for its keys manager, but this type alias chooses the
899901
/// concrete type of the KeysManager.
902+
///
903+
/// (C-not exported) as Arcs don't make sense in bindings
900904
pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, M, T, F, L> = ChannelManager<InMemorySigner, &'a M, &'b T, &'c KeysManager, &'d F, &'e L>;
901905

902906
/// 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
@@ -927,11 +927,8 @@ impl<G: Deref<Target = NetworkGraph>, T: Time> Writeable for ProbabilisticScorer
927927
}
928928
}
929929

930-
impl<G, T> ReadableArgs<(ProbabilisticScoringParameters, G)> for ProbabilisticScorerUsingTime<G, T>
931-
where
932-
G: Deref<Target = NetworkGraph>,
933-
T: Time,
934-
{
930+
impl<G: Deref<Target = NetworkGraph>, T: Time>
931+
ReadableArgs<(ProbabilisticScoringParameters, G)> for ProbabilisticScorerUsingTime<G, T> {
935932
#[inline]
936933
fn read<R: Read>(
937934
r: &mut R, args: (ProbabilisticScoringParameters, G)

0 commit comments

Comments
 (0)