Merge pull request #2582 from TheBlueMatt/2023-09-one-less-clone
[rust-lightning] / lightning / src / chain / onchaintx.rs
index 1d874d43e4fdedb10baf8578ea6591f6ae5148aa..5daa2463de99ec0d129bd3e28f0cf6a11b161e9c 100644 (file)
@@ -1123,8 +1123,8 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
                ret
        }
 
-       pub(crate) fn get_unsigned_holder_commitment_tx(&self) -> Transaction {
-               self.holder_commitment.trust().built_transaction().transaction.clone()
+       pub(crate) fn get_unsigned_holder_commitment_tx(&self) -> &Transaction {
+               &self.holder_commitment.trust().built_transaction().transaction
        }
 
        //TODO: getting lastest holder transactions should be infallible and result in us "force-closing the channel", but we may