From 17d8508ec245b3f87c4cb6ce038f333ff2caa6a0 Mon Sep 17 00:00:00 2001 From: wthrajat Date: Tue, 23 Jan 2024 12:23:27 +0530 Subject: [PATCH] Removed duplicate code to update a map in wallet --- src/wallet/api.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/wallet/api.rs b/src/wallet/api.rs index cae0526b..accabfef 100644 --- a/src/wallet/api.rs +++ b/src/wallet/api.rs @@ -498,14 +498,8 @@ impl Wallet { prevout: OutPoint, contract: ScriptBuf, ) -> Result<(), WalletError> { - // let mut wallet_file_data = Wallet::load_wallet_file_data(&self.wallet_file_path[..])?; - // wallet_file_data - // .prevout_to_contract_map - // .insert(prevout, contract); - // let wallet_file = File::create(&self.wallet_file_path[..])?; - // serde_json::to_writer(wallet_file, &wallet_file_data).map_err(|e| io::Error::from(e))?; if let Some(contract) = self.store.prevout_to_contract_map.insert(prevout, contract) { - log::debug!(target: "Wallet:cache_prevout_to_contract", "prevout-contract map updated. existing contract: {}", contract); + log::debug!(target: "Wallet:cache_prevout_to_contract", "prevout-contract map updated.\nExisting contract: {}", contract); } Ok(()) }