Skip to content

Commit 1bb290e

Browse files
committed
Make ChannelMonitor clonable again
In general, we'd been moving away from ChannelMonitor being clonable, XXXXXXXXXXXXXXXXXXXx
1 parent b328fcf commit 1bb290e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lightning/src/chain/channelmonitor.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ struct HolderSignedTx {
267267

268268
/// We use this to track counterparty commitment transactions and htlcs outputs and
269269
/// use it to generate any justice or 2nd-stage preimage/timeout transactions.
270-
#[derive(PartialEq)]
270+
#[derive(Clone, PartialEq)]
271271
struct CounterpartyCommitmentTransaction {
272272
counterparty_delayed_payment_base_key: PublicKey,
273273
counterparty_htlc_base_key: PublicKey,
@@ -623,6 +623,7 @@ impl Readable for ChannelMonitorUpdateStep {
623623
/// the "reorg path" (ie disconnecting blocks until you find a common ancestor from both the
624624
/// returned block hash and the the current chain and then reconnecting blocks to get to the
625625
/// best chain) upon deserializing the object!
626+
#[derive(Clone)]
626627
pub struct ChannelMonitor<Signer: Sign> {
627628
latest_update_id: u64,
628629
commitment_transaction_number_obscure_factor: u64,

lightning/src/ln/onchaintx.rs

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ impl Writeable for Option<Vec<Option<(usize, Signature)>>> {
240240

241241
/// OnchainTxHandler receives claiming requests, aggregates them if it's sound, broadcast and
242242
/// do RBF bumping if possible.
243+
#[derive(Clone)]
243244
pub struct OnchainTxHandler<ChannelSigner: Sign> {
244245
destination_script: Script,
245246
holder_commitment: HolderCommitmentTransaction,

0 commit comments

Comments
 (0)