Skip to content

Commit 893f08b

Browse files
committed
Remove unnecessary script_pubkey clones
1 parent ae84540 commit 893f08b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ where C::Target: chain::Filter,
150150
// transactions from within the block that previously had not been included in txdata.
151151
if let Some(ref chain_source) = self.chain_source {
152152
let block_hash = header.block_hash();
153-
for (txid, outputs) in txn_outputs.drain(..) {
154-
for (idx, output) in outputs.iter() {
153+
for (txid, mut outputs) in txn_outputs.drain(..) {
154+
for (idx, output) in outputs.drain(..) {
155155
// Register any new outputs with the chain source for filtering and recurse
156156
// if it indicates that there are dependent transactions within the block
157157
// that had not been previously included in txdata.
158158
let output = WatchedOutput {
159159
block_hash: Some(block_hash),
160-
outpoint: OutPoint { txid, index: *idx as u16 },
161-
script_pubkey: output.script_pubkey.clone(),
160+
outpoint: OutPoint { txid, index: idx as u16 },
161+
script_pubkey: output.script_pubkey,
162162
};
163163
if let Some(tx) = chain_source.register_output(output) {
164164
dependent_txdata.push(tx);

0 commit comments

Comments
 (0)