Skip to content

Commit 40a4f86

Browse files
Merge pull request #1346 from TheBlueMatt/2022-03-clones
Add Clone to a few structs which contain only a few fields
2 parents 5e86bbf + 60f7977 commit 40a4f86

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,7 @@ pub enum PaymentSendFailure {
13221322
/// Route hints used in constructing invoices for [phantom node payents].
13231323
///
13241324
/// [phantom node payments]: crate::chain::keysinterface::PhantomKeysManager
1325+
#[derive(Clone)]
13251326
pub struct PhantomRouteHints {
13261327
/// The list of channels to be included in the invoice route hints.
13271328
pub channels: Vec<ChannelDetails>,

lightning/src/routing/scoring.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ impl<'a, S: Writeable> Writeable for MutexGuard<'a, S> {
189189
}
190190
}
191191

192+
#[derive(Clone)]
192193
/// [`Score`] implementation that uses a fixed penalty.
193194
pub struct FixedPenaltyScorer {
194195
penalty_msat: u64,
@@ -252,6 +253,7 @@ pub struct ScorerUsingTime<T: Time> {
252253
channel_failures: HashMap<u64, ChannelFailure<T>>,
253254
}
254255

256+
#[derive(Clone)]
255257
/// Parameters for configuring [`Scorer`].
256258
pub struct ScoringParameters {
257259
/// A fixed penalty in msats to apply to each channel.

0 commit comments

Comments
 (0)