diff --git a/base_layer/core/src/base_node/sync/rpc/sync_utxos_task.rs b/base_layer/core/src/base_node/sync/rpc/sync_utxos_task.rs index 5afd0e627cc..f6c992f0a96 100644 --- a/base_layer/core/src/base_node/sync/rpc/sync_utxos_task.rs +++ b/base_layer/core/src/base_node/sync/rpc/sync_utxos_task.rs @@ -201,7 +201,7 @@ where B: BlockchainBackend + 'static let mut inputs = Vec::with_capacity(inputs_in_block.len()); for input in inputs_in_block { - let mut output_from_current_tranche = if let Some(mined_info) = self + let output_from_current_tranche = if let Some(mined_info) = self .db .fetch_output(input.output_hash()) .await diff --git a/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs b/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs index 707d69d9ac7..4189b328212 100644 --- a/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs +++ b/base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs @@ -623,16 +623,16 @@ impl LMDBDatabase { fn input_with_output_data( &self, txn: &WriteTransaction<'_>, - input: &TransactionInput, + input: TransactionInput, ) -> Result { let input_with_output_data = match input.spent_output { - SpentOutput::OutputData { .. } => input.clone(), + SpentOutput::OutputData { .. } => input, SpentOutput::OutputHash(output_hash) => match self.fetch_output_in_txn(txn, output_hash.as_slice()) { Ok(Some(utxo_mined_info)) => TransactionInput { version: input.version, spent_output: SpentOutput::create_from_output(utxo_mined_info.output), - input_data: input.input_data.clone(), - script_signature: input.script_signature.clone(), + input_data: input.input_data, + script_signature: input.script_signature, }, Ok(None) => { error!( @@ -1240,7 +1240,7 @@ impl LMDBDatabase { } // unique_id_index expects inputs to be inserted before outputs - for input in &inputs { + for input in inputs { let input_with_output_data = self.input_with_output_data(txn, input)?; let smt_key = NodeKey::try_from(input_with_output_data.commitment()?.as_bytes())?; match output_smt.delete(&smt_key)? {