Просмотр исходного кода

drk: simplyfied error logging format

skoupidi 1 год назад
Родитель
Сommit
af83477b23

+ 3 - 3
bin/drk/src/cache.rs

@@ -189,7 +189,7 @@ impl StorageAdapter for CacheSmtStorage {
 
 
     fn put(&mut self, key: BigUint, value: pallas::Base) -> ContractResult {
     fn put(&mut self, key: BigUint, value: pallas::Base) -> ContractResult {
         if let Err(e) = self.overlay.0.insert(&self.tree, &key.to_bytes_le(), &value.to_repr()) {
         if let Err(e) = self.overlay.0.insert(&self.tree, &key.to_bytes_le(), &value.to_repr()) {
-            error!(target: "cache::StorageAdapter::put", "Inserting key {key:?}, value {value:?} into DB failed: {e:?}");
+            error!(target: "cache::StorageAdapter::put", "Inserting key {key:?}, value {value:?} into DB failed: {e}");
             return Err(ContractError::SmtPutFailed)
             return Err(ContractError::SmtPutFailed)
         }
         }
         Ok(())
         Ok(())
@@ -199,7 +199,7 @@ impl StorageAdapter for CacheSmtStorage {
         let value = match self.overlay.0.get(&self.tree, &key.to_bytes_le()) {
         let value = match self.overlay.0.get(&self.tree, &key.to_bytes_le()) {
             Ok(v) => v,
             Ok(v) => v,
             Err(e) => {
             Err(e) => {
-                error!(target: "cache::StorageAdapter::get", "Fetching key {key:?} from DB failed: {e:?}");
+                error!(target: "cache::StorageAdapter::get", "Fetching key {key:?} from DB failed: {e}");
                 return None
                 return None
             }
             }
         };
         };
@@ -214,7 +214,7 @@ impl StorageAdapter for CacheSmtStorage {
 
 
     fn del(&mut self, key: &BigUint) -> ContractResult {
     fn del(&mut self, key: &BigUint) -> ContractResult {
         if let Err(e) = self.overlay.0.remove(&self.tree, &key.to_bytes_le()) {
         if let Err(e) = self.overlay.0.remove(&self.tree, &key.to_bytes_le()) {
-            error!(target: "cache::StorageAdapter::del", "Removing key {key:?} from DB failed: {e:?}");
+            error!(target: "cache::StorageAdapter::del", "Removing key {key:?} from DB failed: {e}");
             return Err(ContractError::SmtDelFailed)
             return Err(ContractError::SmtDelFailed)
         }
         }
         Ok(())
         Ok(())

+ 19 - 20
bin/drk/src/dao.rs

@@ -1002,7 +1002,7 @@ impl Drk {
         let rows = match self.wallet.query_multiple(&DAO_DAOS_TABLE, &[], &[]) {
         let rows = match self.wallet.query_multiple(&DAO_DAOS_TABLE, &[], &[]) {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
-                return Err(Error::DatabaseError(format!("[get_daos] DAOs retrieval failed: {e:?}")))
+                return Err(Error::DatabaseError(format!("[get_daos] DAOs retrieval failed: {e}")))
             }
             }
         };
         };
 
 
@@ -1158,7 +1158,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_dao_proposals] Proposals retrieval failed: {e:?}"
+                    "[get_dao_proposals] Proposals retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -1208,7 +1208,7 @@ impl Drk {
             .await
             .await
         {
         {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[apply_dao_mint_data] Confirm DAO failed: {e:?}"
+                "[apply_dao_mint_data] Confirm DAO failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -1279,7 +1279,7 @@ impl Drk {
             // Update/store our record
             // Update/store our record
             if let Err(e) = self.put_dao_proposal(&our_proposal).await {
             if let Err(e) = self.put_dao_proposal(&our_proposal).await {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[apply_dao_propose_data] Put DAO proposals failed: {e:?}"
+                    "[apply_dao_propose_data] Put DAO proposals failed: {e}"
                 )))
                 )))
             }
             }
 
 
@@ -1356,7 +1356,7 @@ impl Drk {
 
 
         if let Err(e) = self.put_dao_vote(&v).await {
         if let Err(e) = self.put_dao_vote(&v).await {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[apply_dao_vote_data] Put DAO votes failed: {e:?}"
+                "[apply_dao_vote_data] Put DAO votes failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -1397,7 +1397,7 @@ impl Drk {
             .exec_sql(&query, rusqlite::params![Some(*exec_height), Some(serialize(tx_hash)), key])
             .exec_sql(&query, rusqlite::params![Some(*exec_height), Some(serialize(tx_hash)), key])
         {
         {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[apply_dao_exec_data] Update DAO proposal failed: {e:?}"
+                "[apply_dao_exec_data] Update DAO proposal failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -1585,7 +1585,7 @@ impl Drk {
         // Execute the query
         // Execute the query
         if let Err(e) = self.wallet.exec_sql(&query, params) {
         if let Err(e) = self.wallet.exec_sql(&query, params) {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[put_dao_proposal] Proposal insert failed: {e:?}"
+                "[put_dao_proposal] Proposal insert failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -1636,13 +1636,12 @@ impl Drk {
     pub fn reset_dao_trees(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
     pub fn reset_dao_trees(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
         output.push(String::from("Resetting DAO Merkle trees"));
         output.push(String::from("Resetting DAO Merkle trees"));
         if let Err(e) = self.cache.merkle_trees.remove(SLED_MERKLE_TREES_DAO_DAOS) {
         if let Err(e) = self.cache.merkle_trees.remove(SLED_MERKLE_TREES_DAO_DAOS) {
-            output.push(format!("[reset_dao_trees] Resetting DAO DAOs Merkle tree failed: {e:?}"));
+            output.push(format!("[reset_dao_trees] Resetting DAO DAOs Merkle tree failed: {e}"));
             return Err(WalletDbError::GenericError)
             return Err(WalletDbError::GenericError)
         }
         }
         if let Err(e) = self.cache.merkle_trees.remove(SLED_MERKLE_TREES_DAO_PROPOSALS) {
         if let Err(e) = self.cache.merkle_trees.remove(SLED_MERKLE_TREES_DAO_PROPOSALS) {
-            output.push(format!(
-                "[reset_dao_trees] Resetting DAO Proposals Merkle tree failed: {e:?}"
-            ));
+            output
+                .push(format!("[reset_dao_trees] Resetting DAO Proposals Merkle tree failed: {e}"));
             return Err(WalletDbError::GenericError)
             return Err(WalletDbError::GenericError)
         }
         }
         output.push(String::from("Successfully reset DAO Merkle trees"));
         output.push(String::from("Successfully reset DAO Merkle trees"));
@@ -1813,7 +1812,7 @@ impl Drk {
                 serialize_async(params).await,
                 serialize_async(params).await,
             ],
             ],
         ) {
         ) {
-            return Err(Error::DatabaseError(format!("[import_dao] DAO insert failed: {e:?}")))
+            return Err(Error::DatabaseError(format!("[import_dao] DAO insert failed: {e}")))
         };
         };
 
 
         Ok(())
         Ok(())
@@ -1841,7 +1840,7 @@ impl Drk {
             &query,
             &query,
             rusqlite::params![serialize_async(params).await, serialize_async(&bulla).await,],
             rusqlite::params![serialize_async(params).await, serialize_async(&bulla).await,],
         ) {
         ) {
-            return Err(Error::DatabaseError(format!("[update_dao_keys] DAO update failed: {e:?}")))
+            return Err(Error::DatabaseError(format!("[update_dao_keys] DAO update failed: {e}")))
         };
         };
 
 
         Ok(())
         Ok(())
@@ -1857,7 +1856,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_dao_by_bulla] DAO retrieval failed: {e:?}"
+                    "[get_dao_by_bulla] DAO retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -1875,7 +1874,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_dao_by_name] DAO retrieval failed: {e:?}"
+                    "[get_dao_by_name] DAO retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -1934,7 +1933,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_proposals] DAO proposalss retrieval failed: {e:?}"
+                    "[get_proposals] DAO proposalss retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -1961,7 +1960,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_dao_proposal_by_bulla] DAO proposal retrieval failed: {e:?}"
+                    "[get_dao_proposal_by_bulla] DAO proposal retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -1983,7 +1982,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_dao_proposal_votes] Votes retrieval failed: {e:?}"
+                    "[get_dao_proposal_votes] Votes retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -2296,7 +2295,7 @@ impl Drk {
 
 
         if let Err(e) = self.put_dao_proposal(&proposal_record).await {
         if let Err(e) = self.put_dao_proposal(&proposal_record).await {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[dao_propose_transfer] Put DAO proposal failed: {e:?}"
+                "[dao_propose_transfer] Put DAO proposal failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -2356,7 +2355,7 @@ impl Drk {
 
 
         if let Err(e) = self.put_dao_proposal(&proposal_record).await {
         if let Err(e) = self.put_dao_proposal(&proposal_record).await {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[dao_propose_generic] Put DAO proposal failed: {e:?}"
+                "[dao_propose_generic] Put DAO proposal failed: {e}"
             )))
             )))
         }
         }
 
 

+ 2 - 2
bin/drk/src/deploy.rs

@@ -124,7 +124,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[list_deploy_auth] Deploy auth retrieval failed: {e:?}",
+                    "[list_deploy_auth] Deploy auth retrieval failed: {e}",
                 )))
                 )))
             }
             }
         };
         };
@@ -183,7 +183,7 @@ impl Drk {
             Ok(v) => v,
             Ok(v) => v,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[deploy_contract] Failed to retrieve deploy authority keypair: {e:?}"
+                    "[deploy_contract] Failed to retrieve deploy authority keypair: {e}"
                 )))
                 )))
             }
             }
         };
         };

+ 26 - 26
bin/drk/src/interactive.rs

@@ -768,26 +768,26 @@ async fn handle_wallet(drk: &DrkPtr, parts: &[&str], input: &[String], output: &
 async fn handle_wallet_initialize(drk: &DrkPtr, output: &mut Vec<String>) {
 async fn handle_wallet_initialize(drk: &DrkPtr, output: &mut Vec<String>) {
     let lock = drk.read().await;
     let lock = drk.read().await;
     if let Err(e) = lock.initialize_wallet().await {
     if let Err(e) = lock.initialize_wallet().await {
-        output.push(format!("Error initializing wallet: {e:?}"));
+        output.push(format!("Error initializing wallet: {e}"));
         return
         return
     }
     }
     if let Err(e) = lock.initialize_money(output).await {
     if let Err(e) = lock.initialize_money(output).await {
-        output.push(format!("Failed to initialize Money: {e:?}"));
+        output.push(format!("Failed to initialize Money: {e}"));
         return
         return
     }
     }
     if let Err(e) = lock.initialize_dao().await {
     if let Err(e) = lock.initialize_dao().await {
-        output.push(format!("Failed to initialize DAO: {e:?}"));
+        output.push(format!("Failed to initialize DAO: {e}"));
         return
         return
     }
     }
     if let Err(e) = lock.initialize_deployooor() {
     if let Err(e) = lock.initialize_deployooor() {
-        output.push(format!("Failed to initialize Deployooor: {e:?}"));
+        output.push(format!("Failed to initialize Deployooor: {e}"));
     }
     }
 }
 }
 
 
 /// Auxiliary function to define the wallet keygen subcommand handling.
 /// Auxiliary function to define the wallet keygen subcommand handling.
 async fn handle_wallet_keygen(drk: &DrkPtr, output: &mut Vec<String>) {
 async fn handle_wallet_keygen(drk: &DrkPtr, output: &mut Vec<String>) {
     if let Err(e) = drk.read().await.money_keygen(output).await {
     if let Err(e) = drk.read().await.money_keygen(output).await {
-        output.push(format!("Failed to generate keypair: {e:?}"));
+        output.push(format!("Failed to generate keypair: {e}"));
     }
     }
 }
 }
 
 
@@ -797,7 +797,7 @@ async fn handle_wallet_balance(drk: &DrkPtr, output: &mut Vec<String>) {
     let balmap = match lock.money_balance().await {
     let balmap = match lock.money_balance().await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch balances map: {e:?}"));
+            output.push(format!("Failed to fetch balances map: {e}"));
             return
             return
         }
         }
     };
     };
@@ -805,7 +805,7 @@ async fn handle_wallet_balance(drk: &DrkPtr, output: &mut Vec<String>) {
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch aliases map: {e:?}"));
+            output.push(format!("Failed to fetch aliases map: {e}"));
             return
             return
         }
         }
     };
     };
@@ -834,7 +834,7 @@ async fn handle_wallet_balance(drk: &DrkPtr, output: &mut Vec<String>) {
 async fn handle_wallet_address(drk: &DrkPtr, output: &mut Vec<String>) {
 async fn handle_wallet_address(drk: &DrkPtr, output: &mut Vec<String>) {
     match drk.read().await.default_address().await {
     match drk.read().await.default_address().await {
         Ok(address) => output.push(format!("{address}")),
         Ok(address) => output.push(format!("{address}")),
-        Err(e) => output.push(format!("Failed to fetch default address: {e:?}")),
+        Err(e) => output.push(format!("Failed to fetch default address: {e}")),
     }
     }
 }
 }
 
 
@@ -843,7 +843,7 @@ async fn handle_wallet_addresses(drk: &DrkPtr, output: &mut Vec<String>) {
     let addresses = match drk.read().await.addresses().await {
     let addresses = match drk.read().await.addresses().await {
         Ok(a) => a,
         Ok(a) => a,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch addresses: {e:?}"));
+            output.push(format!("Failed to fetch addresses: {e}"));
             return
             return
         }
         }
     };
     };
@@ -878,13 +878,13 @@ async fn handle_wallet_default_address(drk: &DrkPtr, parts: &[&str], output: &mu
     let index = match usize::from_str(parts[2]) {
     let index = match usize::from_str(parts[2]) {
         Ok(i) => i,
         Ok(i) => i,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Invalid address id: {e:?}"));
+            output.push(format!("Invalid address id: {e}"));
             return
             return
         }
         }
     };
     };
 
 
     if let Err(e) = drk.read().await.set_default_address(index) {
     if let Err(e) = drk.read().await.set_default_address(index) {
-        output.push(format!("Failed to set default address: {e:?}"));
+        output.push(format!("Failed to set default address: {e}"));
     }
     }
 }
 }
 
 
@@ -896,7 +896,7 @@ async fn handle_wallet_secrets(drk: &DrkPtr, output: &mut Vec<String>) {
                 output.push(format!("{secret}"));
                 output.push(format!("{secret}"));
             }
             }
         }
         }
-        Err(e) => output.push(format!("Failed to fetch secrets: {e:?}")),
+        Err(e) => output.push(format!("Failed to fetch secrets: {e}")),
     }
     }
 }
 }
 
 
@@ -938,7 +938,7 @@ async fn handle_wallet_import_secrets(drk: &DrkPtr, input: &[String], output: &m
                 output.push(format!("{key}"));
                 output.push(format!("{key}"));
             }
             }
         }
         }
-        Err(e) => output.push(format!("Failed to import secrets: {e:?}")),
+        Err(e) => output.push(format!("Failed to import secrets: {e}")),
     }
     }
 }
 }
 
 
@@ -946,7 +946,7 @@ async fn handle_wallet_import_secrets(drk: &DrkPtr, input: &[String], output: &m
 async fn handle_wallet_tree(drk: &DrkPtr, output: &mut Vec<String>) {
 async fn handle_wallet_tree(drk: &DrkPtr, output: &mut Vec<String>) {
     match drk.read().await.get_money_tree().await {
     match drk.read().await.get_money_tree().await {
         Ok(tree) => output.push(format!("{tree:#?}")),
         Ok(tree) => output.push(format!("{tree:#?}")),
-        Err(e) => output.push(format!("Failed to fetch tree: {e:?}")),
+        Err(e) => output.push(format!("Failed to fetch tree: {e}")),
     }
     }
 }
 }
 
 
@@ -956,7 +956,7 @@ async fn handle_wallet_coins(drk: &DrkPtr, output: &mut Vec<String>) {
     let coins = match lock.get_coins(true).await {
     let coins = match lock.get_coins(true).await {
         Ok(c) => c,
         Ok(c) => c,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch coins: {e:?}"));
+            output.push(format!("Failed to fetch coins: {e}"));
             return
             return
         }
         }
     };
     };
@@ -968,7 +968,7 @@ async fn handle_wallet_coins(drk: &DrkPtr, output: &mut Vec<String>) {
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch aliases map: {e:?}"));
+            output.push(format!("Failed to fetch aliases map: {e}"));
             return
             return
         }
         }
     };
     };
@@ -1630,7 +1630,7 @@ async fn handle_dao_balance(drk: &DrkPtr, parts: &[&str], output: &mut Vec<Strin
     let balmap = match lock.dao_balance(parts[2]).await {
     let balmap = match lock.dao_balance(parts[2]).await {
         Ok(b) => b,
         Ok(b) => b,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch DAO balance: {e:?}"));
+            output.push(format!("Failed to fetch DAO balance: {e}"));
             return
             return
         }
         }
     };
     };
@@ -1638,7 +1638,7 @@ async fn handle_dao_balance(drk: &DrkPtr, parts: &[&str], output: &mut Vec<Strin
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch aliases map: {e:?}"));
+            output.push(format!("Failed to fetch aliases map: {e}"));
             return
             return
         }
         }
     };
     };
@@ -2439,7 +2439,7 @@ async fn handle_scan(
         let height = match u32::from_str(parts[2]) {
         let height = match u32::from_str(parts[2]) {
             Ok(h) => h,
             Ok(h) => h,
             Err(e) => {
             Err(e) => {
-                append_or_print(output, None, print, vec![format!("Invalid reset height: {e:?}")])
+                append_or_print(output, None, print, vec![format!("Invalid reset height: {e}")])
                     .await;
                     .await;
                 return
                 return
             }
             }
@@ -2447,7 +2447,7 @@ async fn handle_scan(
 
 
         let mut buf = vec![];
         let mut buf = vec![];
         if let Err(e) = lock.reset_to_height(height, &mut buf) {
         if let Err(e) = lock.reset_to_height(height, &mut buf) {
-            buf.push(format!("Failed during wallet reset: {e:?}"));
+            buf.push(format!("Failed during wallet reset: {e}"));
             append_or_print(output, None, print, buf).await;
             append_or_print(output, None, print, buf).await;
             return
             return
         }
         }
@@ -2455,7 +2455,7 @@ async fn handle_scan(
     }
     }
 
 
     if let Err(e) = lock.scan_blocks(output, None, print).await {
     if let Err(e) = lock.scan_blocks(output, None, print).await {
-        append_or_print(output, None, print, vec![format!("Failed during scanning: {e:?}")]).await;
+        append_or_print(output, None, print, vec![format!("Failed during scanning: {e}")]).await;
         return
         return
     }
     }
     append_or_print(output, None, print, vec![String::from("Finished scanning blockchain")]).await;
     append_or_print(output, None, print, vec![String::from("Finished scanning blockchain")]).await;
@@ -2745,7 +2745,7 @@ async fn handle_alias_add(drk: &DrkPtr, parts: &[&str], output: &mut Vec<String>
     let token_id = match TokenId::from_str(parts[3]) {
     let token_id = match TokenId::from_str(parts[3]) {
         Ok(t) => t,
         Ok(t) => t,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Invalid Token ID: {e:?}"));
+            output.push(format!("Invalid Token ID: {e}"));
             return
             return
         }
         }
     };
     };
@@ -2777,7 +2777,7 @@ async fn handle_alias_show(drk: &DrkPtr, parts: &[&str], output: &mut Vec<String
             match TokenId::from_str(parts[index + 1]) {
             match TokenId::from_str(parts[index + 1]) {
                 Ok(t) => token_id = Some(t),
                 Ok(t) => token_id = Some(t),
                 Err(e) => {
                 Err(e) => {
-                    output.push(format!("Invalid Token ID: {e:?}"));
+                    output.push(format!("Invalid Token ID: {e}"));
                     return
                     return
                 }
                 }
             };
             };
@@ -2793,7 +2793,7 @@ async fn handle_alias_show(drk: &DrkPtr, parts: &[&str], output: &mut Vec<String
     let map = match drk.read().await.get_aliases(alias, token_id).await {
     let map = match drk.read().await.get_aliases(alias, token_id).await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch aliases map: {e:?}"));
+            output.push(format!("Failed to fetch aliases map: {e}"));
             return
             return
         }
         }
     };
     };
@@ -2915,7 +2915,7 @@ async fn handle_token_list(drk: &DrkPtr, parts: &[&str], output: &mut Vec<String
     let tokens = match lock.get_mint_authorities().await {
     let tokens = match lock.get_mint_authorities().await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch mint authorities: {e:?}"));
+            output.push(format!("Failed to fetch mint authorities: {e}"));
             return
             return
         }
         }
     };
     };
@@ -2923,7 +2923,7 @@ async fn handle_token_list(drk: &DrkPtr, parts: &[&str], output: &mut Vec<String
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
     let aliases_map = match lock.get_aliases_mapped_by_token().await {
         Ok(m) => m,
         Ok(m) => m,
         Err(e) => {
         Err(e) => {
-            output.push(format!("Failed to fetch aliases map: {e:?}"));
+            output.push(format!("Failed to fetch aliases map: {e}"));
             return
             return
         }
         }
     };
     };

+ 52 - 52
bin/drk/src/main.rs

@@ -628,7 +628,7 @@ async fn new_wallet(
     match Drk::new(cache_path, wallet_path, wallet_pass, endpoint, ex, fun).await {
     match Drk::new(cache_path, wallet_path, wallet_pass, endpoint, ex, fun).await {
         Ok(wallet) => wallet,
         Ok(wallet) => wallet,
         Err(e) => {
         Err(e) => {
-            eprintln!("Error initializing wallet: {e:?}");
+            eprintln!("Error initializing wallet: {e}");
             exit(2);
             exit(2);
         }
         }
     }
     }
@@ -712,22 +712,22 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             match command {
             match command {
                 WalletSubcmd::Initialize => {
                 WalletSubcmd::Initialize => {
                     if let Err(e) = drk.initialize_wallet().await {
                     if let Err(e) = drk.initialize_wallet().await {
-                        eprintln!("Error initializing wallet: {e:?}");
+                        eprintln!("Error initializing wallet: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                     let mut output = vec![];
                     let mut output = vec![];
                     if let Err(e) = drk.initialize_money(&mut output).await {
                     if let Err(e) = drk.initialize_money(&mut output).await {
                         print_output(&output);
                         print_output(&output);
-                        eprintln!("Failed to initialize Money: {e:?}");
+                        eprintln!("Failed to initialize Money: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                     print_output(&output);
                     print_output(&output);
                     if let Err(e) = drk.initialize_dao().await {
                     if let Err(e) = drk.initialize_dao().await {
-                        eprintln!("Failed to initialize DAO: {e:?}");
+                        eprintln!("Failed to initialize DAO: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                     if let Err(e) = drk.initialize_deployooor() {
                     if let Err(e) = drk.initialize_deployooor() {
-                        eprintln!("Failed to initialize Deployooor: {e:?}");
+                        eprintln!("Failed to initialize Deployooor: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 }
                 }
@@ -736,7 +736,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                     let mut output = vec![];
                     let mut output = vec![];
                     if let Err(e) = drk.money_keygen(&mut output).await {
                     if let Err(e) = drk.money_keygen(&mut output).await {
                         print_output(&output);
                         print_output(&output);
-                        eprintln!("Failed to generate keypair: {e:?}");
+                        eprintln!("Failed to generate keypair: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                     print_output(&output);
                     print_output(&output);
@@ -774,7 +774,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 WalletSubcmd::Address => match drk.default_address().await {
                 WalletSubcmd::Address => match drk.default_address().await {
                     Ok(address) => println!("{address}"),
                     Ok(address) => println!("{address}"),
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to fetch default address: {e:?}");
+                        eprintln!("Failed to fetch default address: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 },
                 },
@@ -803,7 +803,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
 
 
                 WalletSubcmd::DefaultAddress { index } => {
                 WalletSubcmd::DefaultAddress { index } => {
                     if let Err(e) = drk.set_default_address(index) {
                     if let Err(e) = drk.set_default_address(index) {
-                        eprintln!("Failed to set default address: {e:?}");
+                        eprintln!("Failed to set default address: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 }
                 }
@@ -836,7 +836,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                         }
                         }
                         Err(e) => {
                         Err(e) => {
                             print_output(&output);
                             print_output(&output);
-                            eprintln!("Failed to import secret keys into wallet: {e:?}");
+                            eprintln!("Failed to import secret keys into wallet: {e}");
                             exit(2);
                             exit(2);
                         }
                         }
                     };
                     };
@@ -941,7 +941,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             let mut output = vec![];
             let mut output = vec![];
             if let Err(e) = drk.mark_tx_spend(&tx, &mut output).await {
             if let Err(e) = drk.mark_tx_spend(&tx, &mut output).await {
                 print_output(&output);
                 print_output(&output);
-                eprintln!("Failed to mark transaction coins as spent: {e:?}");
+                eprintln!("Failed to mark transaction coins as spent: {e}");
                 exit(2);
                 exit(2);
             };
             };
             print_output(&output);
             print_output(&output);
@@ -977,7 +977,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             )
             )
             .await;
             .await;
             if let Err(e) = drk.unspend_coin(&coin).await {
             if let Err(e) = drk.unspend_coin(&coin).await {
-                eprintln!("Failed to mark coin as unspent: {e:?}");
+                eprintln!("Failed to mark coin as unspent: {e}");
                 exit(2);
                 exit(2);
             }
             }
 
 
@@ -996,14 +996,14 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             .await;
             .await;
 
 
             if let Err(e) = f64::from_str(&amount) {
             if let Err(e) = f64::from_str(&amount) {
-                eprintln!("Invalid amount: {e:?}");
+                eprintln!("Invalid amount: {e}");
                 exit(2);
                 exit(2);
             }
             }
 
 
             let rcpt = match PublicKey::from_str(&recipient) {
             let rcpt = match PublicKey::from_str(&recipient) {
                 Ok(r) => r,
                 Ok(r) => r,
                 Err(e) => {
                 Err(e) => {
-                    eprintln!("Invalid recipient: {e:?}");
+                    eprintln!("Invalid recipient: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
             };
             };
@@ -1011,7 +1011,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             let token_id = match drk.get_token(token).await {
             let token_id = match drk.get_token(token).await {
                 Ok(t) => t,
                 Ok(t) => t,
                 Err(e) => {
                 Err(e) => {
-                    eprintln!("Invalid token alias: {e:?}");
+                    eprintln!("Invalid token alias: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
             };
             };
@@ -1020,7 +1020,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 Some(s) => match FuncId::from_str(&s) {
                 Some(s) => match FuncId::from_str(&s) {
                     Ok(s) => Some(s),
                     Ok(s) => Some(s),
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid spend hook: {e:?}");
+                        eprintln!("Invalid spend hook: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 },
                 },
@@ -1054,7 +1054,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             {
             {
                 Ok(t) => t,
                 Ok(t) => t,
                 Err(e) => {
                 Err(e) => {
-                    eprintln!("Failed to create payment transaction: {e:?}");
+                    eprintln!("Failed to create payment transaction: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
             };
             };
@@ -1081,7 +1081,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let half = match drk.init_swap(value_pair, token_pair, None, None, None).await {
                 let half = match drk.init_swap(value_pair, token_pair, None, None, None).await {
                     Ok(h) => h,
                     Ok(h) => h,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to create swap transaction half: {e:?}");
+                        eprintln!("Failed to create swap transaction half: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1112,7 +1112,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let tx = match drk.join_swap(partial, None, None, None).await {
                 let tx = match drk.join_swap(partial, None, None, None).await {
                     Ok(tx) => tx,
                     Ok(tx) => tx,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to create a join swap transaction: {e:?}");
+                        eprintln!("Failed to create a join swap transaction: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1141,7 +1141,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let mut output = vec![];
                 let mut output = vec![];
                 if let Err(e) = drk.inspect_swap(bytes, &mut output).await {
                 if let Err(e) = drk.inspect_swap(bytes, &mut output).await {
                     print_output(&output);
                     print_output(&output);
-                    eprintln!("Failed to inspect swap: {e:?}");
+                    eprintln!("Failed to inspect swap: {e}");
                     exit(2);
                     exit(2);
                 };
                 };
                 print_output(&output);
                 print_output(&output);
@@ -1162,7 +1162,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 )
                 )
                 .await;
                 .await;
                 if let Err(e) = drk.sign_swap(&mut tx).await {
                 if let Err(e) = drk.sign_swap(&mut tx).await {
-                    eprintln!("Failed to sign joined swap transaction: {e:?}");
+                    eprintln!("Failed to sign joined swap transaction: {e}");
                     exit(2);
                     exit(2);
                 };
                 };
 
 
@@ -1180,15 +1180,15 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 gov_token_id,
                 gov_token_id,
             } => {
             } => {
                 if let Err(e) = f64::from_str(&proposer_limit) {
                 if let Err(e) = f64::from_str(&proposer_limit) {
-                    eprintln!("Invalid proposer limit: {e:?}");
+                    eprintln!("Invalid proposer limit: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
                 if let Err(e) = f64::from_str(&quorum) {
                 if let Err(e) = f64::from_str(&quorum) {
-                    eprintln!("Invalid quorum: {e:?}");
+                    eprintln!("Invalid quorum: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
                 if let Err(e) = f64::from_str(&early_exec_quorum) {
                 if let Err(e) = f64::from_str(&early_exec_quorum) {
-                    eprintln!("Invalid early exec quorum: {e:?}");
+                    eprintln!("Invalid early exec quorum: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
 
 
@@ -1217,7 +1217,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let gov_token_id = match drk.get_token(gov_token_id).await {
                 let gov_token_id = match drk.get_token(gov_token_id).await {
                     Ok(g) => g,
                     Ok(g) => g,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid Token ID: {e:?}");
+                        eprintln!("Invalid Token ID: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1283,7 +1283,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let mut output = vec![];
                 let mut output = vec![];
                 if let Err(e) = drk.import_dao(&name, &params, &mut output).await {
                 if let Err(e) = drk.import_dao(&name, &params, &mut output).await {
                     print_output(&output);
                     print_output(&output);
-                    eprintln!("Failed to import DAO: {e:?}");
+                    eprintln!("Failed to import DAO: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
                 print_output(&output);
                 print_output(&output);
@@ -1308,7 +1308,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let mut output = vec![];
                 let mut output = vec![];
                 if let Err(e) = drk.update_dao_keys(&params, &mut output).await {
                 if let Err(e) = drk.update_dao_keys(&params, &mut output).await {
                     print_output(&output);
                     print_output(&output);
-                    eprintln!("Failed to update DAO keys: {e:?}");
+                    eprintln!("Failed to update DAO keys: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
                 print_output(&output);
                 print_output(&output);
@@ -1329,7 +1329,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let mut output = vec![];
                 let mut output = vec![];
                 if let Err(e) = drk.dao_list(&name, &mut output).await {
                 if let Err(e) = drk.dao_list(&name, &mut output).await {
                     print_output(&output);
                     print_output(&output);
-                    eprintln!("Failed to list DAO: {e:?}");
+                    eprintln!("Failed to list DAO: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
                 print_output(&output);
                 print_output(&output);
@@ -1350,7 +1350,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let balmap = match drk.dao_balance(&name).await {
                 let balmap = match drk.dao_balance(&name).await {
                     Ok(b) => b,
                     Ok(b) => b,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to fetch DAO balance: {e:?}");
+                        eprintln!("Failed to fetch DAO balance: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1358,7 +1358,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let aliases_map = match drk.get_aliases_mapped_by_token().await {
                 let aliases_map = match drk.get_aliases_mapped_by_token().await {
                     Ok(a) => a,
                     Ok(a) => a,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to fetch wallet aliases: {e:?}");
+                        eprintln!("Failed to fetch wallet aliases: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1402,7 +1402,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let tx = match drk.dao_mint(&name).await {
                 let tx = match drk.dao_mint(&name).await {
                     Ok(tx) => tx,
                     Ok(tx) => tx,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to mint DAO: {e:?}");
+                        eprintln!("Failed to mint DAO: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1431,14 +1431,14 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 .await;
                 .await;
 
 
                 if let Err(e) = f64::from_str(&amount) {
                 if let Err(e) = f64::from_str(&amount) {
-                    eprintln!("Invalid amount: {e:?}");
+                    eprintln!("Invalid amount: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
 
 
                 let rcpt = match PublicKey::from_str(&recipient) {
                 let rcpt = match PublicKey::from_str(&recipient) {
                     Ok(r) => r,
                     Ok(r) => r,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid recipient: {e:?}");
+                        eprintln!("Invalid recipient: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1446,7 +1446,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let token_id = match drk.get_token(token).await {
                 let token_id = match drk.get_token(token).await {
                     Ok(t) => t,
                     Ok(t) => t,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid token alias: {e:?}");
+                        eprintln!("Invalid token alias: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1455,7 +1455,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                     Some(s) => match FuncId::from_str(&s) {
                     Some(s) => match FuncId::from_str(&s) {
                         Ok(s) => Some(s),
                         Ok(s) => Some(s),
                         Err(e) => {
                         Err(e) => {
-                            eprintln!("Invalid spend hook: {e:?}");
+                            eprintln!("Invalid spend hook: {e}");
                             exit(2);
                             exit(2);
                         }
                         }
                     },
                     },
@@ -1491,7 +1491,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 {
                 {
                     Ok(p) => p,
                     Ok(p) => p,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to create DAO transfer proposal: {e:?}");
+                        eprintln!("Failed to create DAO transfer proposal: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1536,7 +1536,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let proposal = match drk.dao_propose_generic(&name, duration, user_data).await {
                 let proposal = match drk.dao_propose_generic(&name, duration, user_data).await {
                     Ok(p) => p,
                     Ok(p) => p,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to create DAO generic proposal: {e:?}");
+                        eprintln!("Failed to create DAO generic proposal: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1569,7 +1569,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let bulla = match DaoProposalBulla::from_str(&bulla) {
                 let bulla = match DaoProposalBulla::from_str(&bulla) {
                     Ok(b) => b,
                     Ok(b) => b,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid proposal bulla: {e:?}");
+                        eprintln!("Invalid proposal bulla: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1610,7 +1610,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                             let tx = match drk.dao_transfer_proposal_tx(&proposal).await {
                             let tx = match drk.dao_transfer_proposal_tx(&proposal).await {
                                 Ok(tx) => tx,
                                 Ok(tx) => tx,
                                 Err(e) => {
                                 Err(e) => {
-                                    eprintln!("Failed to create DAO transfer proposal: {e:?}");
+                                    eprintln!("Failed to create DAO transfer proposal: {e}");
                                     exit(2);
                                     exit(2);
                                 }
                                 }
                             };
                             };
@@ -1625,7 +1625,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                         let tx = match drk.dao_generic_proposal_tx(&proposal).await {
                         let tx = match drk.dao_generic_proposal_tx(&proposal).await {
                             Ok(tx) => tx,
                             Ok(tx) => tx,
                             Err(e) => {
                             Err(e) => {
-                                eprintln!("Failed to create DAO generic proposal: {e:?}");
+                                eprintln!("Failed to create DAO generic proposal: {e}");
                                 exit(2);
                                 exit(2);
                             }
                             }
                         };
                         };
@@ -1827,7 +1827,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let bulla = match DaoProposalBulla::from_str(&bulla) {
                 let bulla = match DaoProposalBulla::from_str(&bulla) {
                     Ok(b) => b,
                     Ok(b) => b,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid proposal bulla: {e:?}");
+                        eprintln!("Invalid proposal bulla: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1841,7 +1841,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let weight = match vote_weight {
                 let weight = match vote_weight {
                     Some(w) => {
                     Some(w) => {
                         if let Err(e) = f64::from_str(&w) {
                         if let Err(e) = f64::from_str(&w) {
-                            eprintln!("Invalid vote weight: {e:?}");
+                            eprintln!("Invalid vote weight: {e}");
                             exit(2);
                             exit(2);
                         }
                         }
                         Some(decode_base10(&w, BALANCE_BASE10_DECIMALS, true)?)
                         Some(decode_base10(&w, BALANCE_BASE10_DECIMALS, true)?)
@@ -1861,7 +1861,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let tx = match drk.dao_vote(&bulla, vote, weight).await {
                 let tx = match drk.dao_vote(&bulla, vote, weight).await {
                     Ok(tx) => tx,
                     Ok(tx) => tx,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Failed to create DAO Vote transaction: {e:?}");
+                        eprintln!("Failed to create DAO Vote transaction: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1874,7 +1874,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let bulla = match DaoProposalBulla::from_str(&bulla) {
                 let bulla = match DaoProposalBulla::from_str(&bulla) {
                     Ok(b) => b,
                     Ok(b) => b,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid proposal bulla: {e:?}");
+                        eprintln!("Invalid proposal bulla: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };
@@ -1897,7 +1897,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                         let tx = match drk.dao_exec_transfer(&proposal, early).await {
                         let tx = match drk.dao_exec_transfer(&proposal, early).await {
                             Ok(tx) => tx,
                             Ok(tx) => tx,
                             Err(e) => {
                             Err(e) => {
-                                eprintln!("Failed to execute DAO transfer proposal: {e:?}");
+                                eprintln!("Failed to execute DAO transfer proposal: {e}");
                                 exit(2);
                                 exit(2);
                             }
                             }
                         };
                         };
@@ -1912,7 +1912,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                     let tx = match drk.dao_exec_generic(&proposal, early).await {
                     let tx = match drk.dao_exec_generic(&proposal, early).await {
                         Ok(tx) => tx,
                         Ok(tx) => tx,
                         Err(e) => {
                         Err(e) => {
-                            eprintln!("Failed to execute DAO generic proposal: {e:?}");
+                            eprintln!("Failed to execute DAO generic proposal: {e}");
                             exit(2);
                             exit(2);
                         }
                         }
                     };
                     };
@@ -1949,7 +1949,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             )
             )
             .await;
             .await;
             if let Err(e) = drk.attach_fee(&mut tx).await {
             if let Err(e) = drk.attach_fee(&mut tx).await {
-                eprintln!("Failed to attach the fee call to the transaction: {e:?}");
+                eprintln!("Failed to attach the fee call to the transaction: {e}");
                 exit(2);
                 exit(2);
             };
             };
 
 
@@ -1980,14 +1980,14 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
             .await;
             .await;
 
 
             if let Err(e) = drk.simulate_tx(&tx).await {
             if let Err(e) = drk.simulate_tx(&tx).await {
-                eprintln!("Failed to simulate tx: {e:?}");
+                eprintln!("Failed to simulate tx: {e}");
                 exit(2);
                 exit(2);
             };
             };
 
 
             let mut output = vec![];
             let mut output = vec![];
             if let Err(e) = drk.mark_tx_spend(&tx, &mut output).await {
             if let Err(e) = drk.mark_tx_spend(&tx, &mut output).await {
                 print_output(&output);
                 print_output(&output);
-                eprintln!("Failed to mark transaction coins as spent: {e:?}");
+                eprintln!("Failed to mark transaction coins as spent: {e}");
                 exit(2);
                 exit(2);
             };
             };
 
 
@@ -1995,7 +1995,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 Ok(t) => t,
                 Ok(t) => t,
                 Err(e) => {
                 Err(e) => {
                     print_output(&output);
                     print_output(&output);
-                    eprintln!("Failed to broadcast transaction: {e:?}");
+                    eprintln!("Failed to broadcast transaction: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
             };
             };
@@ -2021,14 +2021,14 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let mut buf = vec![];
                 let mut buf = vec![];
                 if let Err(e) = drk.reset_to_height(height, &mut buf) {
                 if let Err(e) = drk.reset_to_height(height, &mut buf) {
                     print_output(&buf);
                     print_output(&buf);
-                    eprintln!("Failed during wallet reset: {e:?}");
+                    eprintln!("Failed during wallet reset: {e}");
                     exit(2);
                     exit(2);
                 }
                 }
                 print_output(&buf);
                 print_output(&buf);
             }
             }
 
 
             if let Err(e) = drk.scan_blocks(&mut vec![], None, &true).await {
             if let Err(e) = drk.scan_blocks(&mut vec![], None, &true).await {
-                eprintln!("Failed during scanning: {e:?}");
+                eprintln!("Failed during scanning: {e}");
                 exit(2);
                 exit(2);
             }
             }
             println!("Finished scanning blockchain");
             println!("Finished scanning blockchain");
@@ -2247,7 +2247,7 @@ async fn realmain(args: Args, ex: ExecutorPtr) -> Result<()> {
                 let token_id = match TokenId::from_str(token.as_str()) {
                 let token_id = match TokenId::from_str(token.as_str()) {
                     Ok(t) => t,
                     Ok(t) => t,
                     Err(e) => {
                     Err(e) => {
-                        eprintln!("Invalid Token ID: {e:?}");
+                        eprintln!("Invalid Token ID: {e}");
                         exit(2);
                         exit(2);
                     }
                     }
                 };
                 };

+ 15 - 18
bin/drk/src/money.rs

@@ -171,7 +171,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[default_secret] Default secret key retrieval failed: {e:?}"
+                    "[default_secret] Default secret key retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -194,7 +194,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[default_address] Default address retrieval failed: {e:?}"
+                    "[default_address] Default address retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -229,7 +229,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[addresses] Addresses retrieval failed: {e:?}"
+                    "[addresses] Addresses retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -273,7 +273,7 @@ impl Drk {
                 Ok(r) => r,
                 Ok(r) => r,
                 Err(e) => {
                 Err(e) => {
                     return Err(Error::DatabaseError(format!(
                     return Err(Error::DatabaseError(format!(
-                        "[get_money_secrets] Secret keys retrieval failed: {e:?}"
+                        "[get_money_secrets] Secret keys retrieval failed: {e}"
                     )))
                     )))
                 }
                 }
             };
             };
@@ -329,7 +329,7 @@ impl Drk {
                 self.wallet.exec_sql(&query, rusqlite::params![is_default, public, secret])
                 self.wallet.exec_sql(&query, rusqlite::params![is_default, public, secret])
             {
             {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[import_money_secrets] Inserting new address failed: {e:?}"
+                    "[import_money_secrets] Inserting new address failed: {e}"
                 )))
                 )))
             }
             }
         }
         }
@@ -379,9 +379,7 @@ impl Drk {
         let rows = match query {
         let rows = match query {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
-                return Err(Error::DatabaseError(format!(
-                    "[get_coins] Coins retrieval failed: {e:?}"
-                )))
+                return Err(Error::DatabaseError(format!("[get_coins] Coins retrieval failed: {e}")))
             }
             }
         };
         };
 
 
@@ -409,7 +407,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_token_coins] Coins retrieval failed: {e:?}"
+                    "[get_token_coins] Coins retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -444,7 +442,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_contract_token_coins] Coins retrieval failed: {e:?}"
+                    "[get_contract_token_coins] Coins retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -601,7 +599,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_aliases] Aliases retrieval failed: {e:?}"
+                    "[get_aliases] Aliases retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -881,7 +879,7 @@ impl Drk {
 
 
             if let Err(e) = self.wallet.exec_sql(&query, params) {
             if let Err(e) = self.wallet.exec_sql(&query, params) {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[handle_money_call_owncoins] Inserting Money coin failed: {e:?}"
+                    "[handle_money_call_owncoins] Inserting Money coin failed: {e}"
                 )))
                 )))
             }
             }
         }
         }
@@ -935,7 +933,7 @@ impl Drk {
                 self.wallet.exec_sql(&query, rusqlite::params![Some(*freeze_height), key])
                 self.wallet.exec_sql(&query, rusqlite::params![Some(*freeze_height), key])
             {
             {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[handle_money_call_freezes] Update Money token freeze failed: {e:?}"
+                    "[handle_money_call_freezes] Update Money token freeze failed: {e}"
                 )))
                 )))
             }
             }
         }
         }
@@ -1094,7 +1092,7 @@ impl Drk {
                 self.wallet.exec_sql(&query, rusqlite::params![spent_height, spent_tx_hash, ownoin])
                 self.wallet.exec_sql(&query, rusqlite::params![spent_height, spent_tx_hash, ownoin])
             {
             {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[mark_spent_coins] Marking spent coin failed: {e:?}"
+                    "[mark_spent_coins] Marking spent coin failed: {e}"
                 )))
                 )))
             }
             }
 
 
@@ -1117,7 +1115,7 @@ impl Drk {
     pub fn reset_money_tree(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
     pub fn reset_money_tree(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
         output.push(String::from("Resetting Money Merkle tree"));
         output.push(String::from("Resetting Money Merkle tree"));
         if let Err(e) = self.cache.merkle_trees.remove(SLED_MERKLE_TREES_MONEY) {
         if let Err(e) = self.cache.merkle_trees.remove(SLED_MERKLE_TREES_MONEY) {
-            output.push(format!("[reset_money_tree] Resetting Money Merkle tree failed: {e:?}"));
+            output.push(format!("[reset_money_tree] Resetting Money Merkle tree failed: {e}"));
             return Err(WalletDbError::GenericError)
             return Err(WalletDbError::GenericError)
         }
         }
         output.push(String::from("Successfully reset Money Merkle tree"));
         output.push(String::from("Successfully reset Money Merkle tree"));
@@ -1129,9 +1127,8 @@ impl Drk {
     pub fn reset_money_smt(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
     pub fn reset_money_smt(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
         output.push(String::from("Resetting Money Sparse Merkle tree"));
         output.push(String::from("Resetting Money Sparse Merkle tree"));
         if let Err(e) = self.cache.money_smt.clear() {
         if let Err(e) = self.cache.money_smt.clear() {
-            output.push(format!(
-                "[reset_money_smt] Resetting Money Sparse Merkle tree failed: {e:?}"
-            ));
+            output
+                .push(format!("[reset_money_smt] Resetting Money Sparse Merkle tree failed: {e}"));
             return Err(WalletDbError::GenericError)
             return Err(WalletDbError::GenericError)
         }
         }
         output.push(String::from("Successfully reset Money Sparse Merkle tree"));
         output.push(String::from("Successfully reset Money Sparse Merkle tree"));

+ 16 - 16
bin/drk/src/rpc.rs

@@ -275,7 +275,7 @@ impl Drk {
             self.put_tx_history_records(&wallet_txs, "Confirmed", Some(block.header.height)).await
             self.put_tx_history_records(&wallet_txs, "Confirmed", Some(block.header.height)).await
         {
         {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[scan_block] Inserting transaction history records failed: {e:?}"
+                "[scan_block] Inserting transaction history records failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -304,7 +304,7 @@ impl Drk {
                     output,
                     output,
                     sender,
                     sender,
                     print,
                     print,
-                    vec![format!("[scan_blocks] RPC client request failed: {e:?}")],
+                    vec![format!("[scan_blocks] RPC client request failed: {e}")],
                 )
                 )
                 .await;
                 .await;
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
@@ -327,7 +327,7 @@ impl Drk {
                     // Check if block was found
                     // Check if block was found
                     Err(Error::JsonRpcError((-32121, _))) => None,
                     Err(Error::JsonRpcError((-32121, _))) => None,
                     Err(e) => {
                     Err(e) => {
-                        buf.push(format!("[scan_blocks] RPC client request failed: {e:?}"));
+                        buf.push(format!("[scan_blocks] RPC client request failed: {e}"));
                         append_or_print(output, sender, print, buf).await;
                         append_or_print(output, sender, print, buf).await;
                         return Err(WalletDbError::GenericError)
                         return Err(WalletDbError::GenericError)
                     }
                     }
@@ -365,7 +365,7 @@ impl Drk {
                     output,
                     output,
                     sender,
                     sender,
                     print,
                     print,
-                    vec![format!("[scan_blocks] Generating scan cache failed: {e:?}")],
+                    vec![format!("[scan_blocks] Generating scan cache failed: {e}")],
                 )
                 )
                 .await;
                 .await;
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
@@ -378,7 +378,7 @@ impl Drk {
             let (last_height, last_hash) = match self.get_last_confirmed_block().await {
             let (last_height, last_hash) = match self.get_last_confirmed_block().await {
                 Ok(last) => last,
                 Ok(last) => last,
                 Err(e) => {
                 Err(e) => {
-                    buf.push(format!("[scan_blocks] RPC client request failed: {e:?}"));
+                    buf.push(format!("[scan_blocks] RPC client request failed: {e}"));
                     append_or_print(output, sender, print, buf).await;
                     append_or_print(output, sender, print, buf).await;
                     return Err(WalletDbError::GenericError)
                     return Err(WalletDbError::GenericError)
                 }
                 }
@@ -399,14 +399,14 @@ impl Drk {
                 let block = match self.get_block_by_height(height).await {
                 let block = match self.get_block_by_height(height).await {
                     Ok(b) => b,
                     Ok(b) => b,
                     Err(e) => {
                     Err(e) => {
-                        buf.push(format!("[scan_blocks] RPC client request failed: {e:?}"));
+                        buf.push(format!("[scan_blocks] RPC client request failed: {e}"));
                         append_or_print(output, sender, print, buf).await;
                         append_or_print(output, sender, print, buf).await;
                         return Err(WalletDbError::GenericError)
                         return Err(WalletDbError::GenericError)
                     }
                     }
                 };
                 };
                 buf.push(format!("Block {height} received! Scanning block..."));
                 buf.push(format!("Block {height} received! Scanning block..."));
                 if let Err(e) = self.scan_block(&mut scan_cache, &block).await {
                 if let Err(e) = self.scan_block(&mut scan_cache, &block).await {
-                    buf.push(format!("[scan_blocks] Scan block failed: {e:?}"));
+                    buf.push(format!("[scan_blocks] Scan block failed: {e}"));
                     append_or_print(output, sender, print, buf).await;
                     append_or_print(output, sender, print, buf).await;
                     return Err(WalletDbError::GenericError)
                     return Err(WalletDbError::GenericError)
                 };
                 };
@@ -459,7 +459,7 @@ impl Drk {
         // Store transactions history record
         // Store transactions history record
         if let Err(e) = self.put_tx_history_record(tx, "Broadcasted", None).await {
         if let Err(e) = self.put_tx_history_record(tx, "Broadcasted", None).await {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[broadcast_tx] Inserting transaction history record failed: {e:?}"
+                "[broadcast_tx] Inserting transaction history record failed: {e}"
             )))
             )))
         }
         }
 
 
@@ -603,7 +603,7 @@ pub async fn subscribe_blocks(
     // First we do a clean scan
     // First we do a clean scan
     let lock = drk.read().await;
     let lock = drk.read().await;
     if let Err(e) = lock.scan_blocks(&mut vec![], Some(&shell_sender), &false).await {
     if let Err(e) = lock.scan_blocks(&mut vec![], Some(&shell_sender), &false).await {
-        let err_msg = format!("Failed during scanning: {e:?}");
+        let err_msg = format!("Failed during scanning: {e}");
         shell_sender.send(vec![err_msg.clone()]).await?;
         shell_sender.send(vec![err_msg.clone()]).await?;
         return Err(Error::Custom(err_msg))
         return Err(Error::Custom(err_msg))
     }
     }
@@ -615,7 +615,7 @@ pub async fn subscribe_blocks(
     // Handle genesis(0) block
     // Handle genesis(0) block
     if last_confirmed_height == 0 {
     if last_confirmed_height == 0 {
         if let Err(e) = lock.scan_blocks(&mut vec![], Some(&shell_sender), &false).await {
         if let Err(e) = lock.scan_blocks(&mut vec![], Some(&shell_sender), &false).await {
-            let err_msg = format!("[subscribe_blocks] Scanning from genesis block failed: {e:?}");
+            let err_msg = format!("[subscribe_blocks] Scanning from genesis block failed: {e}");
             shell_sender.send(vec![err_msg.clone()]).await?;
             shell_sender.send(vec![err_msg.clone()]).await?;
             return Err(Error::Custom(err_msg))
             return Err(Error::Custom(err_msg))
         }
         }
@@ -628,7 +628,7 @@ pub async fn subscribe_blocks(
     let (mut last_scanned_height, last_scanned_hash) = match lock.get_last_scanned_block() {
     let (mut last_scanned_height, last_scanned_hash) = match lock.get_last_scanned_block() {
         Ok(last) => last,
         Ok(last) => last,
         Err(e) => {
         Err(e) => {
-            let err_msg = format!("[subscribe_blocks] Retrieving last scanned block failed: {e:?}");
+            let err_msg = format!("[subscribe_blocks] Retrieving last scanned block failed: {e}");
             shell_sender.send(vec![err_msg.clone()]).await?;
             shell_sender.send(vec![err_msg.clone()]).await?;
             return Err(Error::Custom(err_msg))
             return Err(Error::Custom(err_msg))
         }
         }
@@ -664,7 +664,7 @@ pub async fn subscribe_blocks(
             match res {
             match res {
                 Ok(()) => { /* Do nothing */ }
                 Ok(()) => { /* Do nothing */ }
                 Err(e) => {
                 Err(e) => {
-                    eprintln!("[subscribe_blocks] JSON-RPC server error: {e:?}");
+                    eprintln!("[subscribe_blocks] JSON-RPC server error: {e}");
                     publisher
                     publisher
                         .notify(JsonResult::Error(JsonError::new(
                         .notify(JsonResult::Error(JsonError::new(
                             ErrorCode::InternalError,
                             ErrorCode::InternalError,
@@ -724,7 +724,7 @@ pub async fn subscribe_blocks(
                         if let Err(e) = lock.reset_to_height(reset_height, &mut shell_message) {
                         if let Err(e) = lock.reset_to_height(reset_height, &mut shell_message) {
                             shell_sender.send(shell_message).await?;
                             shell_sender.send(shell_message).await?;
                             break 'outer Error::Custom(format!(
                             break 'outer Error::Custom(format!(
-                                "[subscribe_blocks] Wallet state reset failed: {e:?}"
+                                "[subscribe_blocks] Wallet state reset failed: {e}"
                             ))
                             ))
                         }
                         }
 
 
@@ -735,7 +735,7 @@ pub async fn subscribe_blocks(
                                 Err(e) => {
                                 Err(e) => {
                                     shell_sender.send(shell_message).await?;
                                     shell_sender.send(shell_message).await?;
                                     break 'outer Error::Custom(format!(
                                     break 'outer Error::Custom(format!(
-                                        "[subscribe_blocks] RPC client request failed: {e:?}"
+                                        "[subscribe_blocks] RPC client request failed: {e}"
                                     ))
                                     ))
                                 }
                                 }
                             };
                             };
@@ -743,7 +743,7 @@ pub async fn subscribe_blocks(
                             if let Err(e) = lock.scan_block(&mut scan_cache, &genesis).await {
                             if let Err(e) = lock.scan_block(&mut scan_cache, &genesis).await {
                                 shell_sender.send(shell_message).await?;
                                 shell_sender.send(shell_message).await?;
                                 break 'outer Error::Custom(format!(
                                 break 'outer Error::Custom(format!(
-                                    "[subscribe_blocks] Scanning block failed: {e:?}"
+                                    "[subscribe_blocks] Scanning block failed: {e}"
                                 ))
                                 ))
                             };
                             };
                             for msg in scan_cache.flush_messages() {
                             for msg in scan_cache.flush_messages() {
@@ -756,7 +756,7 @@ pub async fn subscribe_blocks(
                     if let Err(e) = lock.scan_block(&mut scan_cache, &block).await {
                     if let Err(e) = lock.scan_block(&mut scan_cache, &block).await {
                         shell_sender.send(shell_message).await?;
                         shell_sender.send(shell_message).await?;
                         break 'outer Error::Custom(format!(
                         break 'outer Error::Custom(format!(
-                            "[subscribe_blocks] Scanning block failed: {e:?}"
+                            "[subscribe_blocks] Scanning block failed: {e}"
                         ))
                         ))
                     }
                     }
                     for msg in scan_cache.flush_messages() {
                     for msg in scan_cache.flush_messages() {

+ 11 - 11
bin/drk/src/scanned_blocks.rs

@@ -81,14 +81,13 @@ impl Drk {
     pub fn reset_scanned_blocks(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
     pub fn reset_scanned_blocks(&self, output: &mut Vec<String>) -> WalletDbResult<()> {
         output.push(String::from("Resetting scanned blocks"));
         output.push(String::from("Resetting scanned blocks"));
         if let Err(e) = self.cache.scanned_blocks.clear() {
         if let Err(e) = self.cache.scanned_blocks.clear() {
-            output.push(format!(
-                "[reset_scanned_blocks] Resetting scanned blocks tree failed: {e:?}"
-            ));
+            output
+                .push(format!("[reset_scanned_blocks] Resetting scanned blocks tree failed: {e}"));
             return Err(WalletDbError::GenericError)
             return Err(WalletDbError::GenericError)
         }
         }
         if let Err(e) = self.cache.state_inverse_diff.clear() {
         if let Err(e) = self.cache.state_inverse_diff.clear() {
             output.push(format!(
             output.push(format!(
-                "[reset_scanned_blocks] Resetting state inverse diffs tree failed: {e:?}"
+                "[reset_scanned_blocks] Resetting state inverse diffs tree failed: {e}"
             ));
             ));
             return Err(WalletDbError::GenericError)
             return Err(WalletDbError::GenericError)
         }
         }
@@ -123,7 +122,7 @@ impl Drk {
         let mut overlay = match CacheOverlay::new(&self.cache) {
         let mut overlay = match CacheOverlay::new(&self.cache) {
             Ok(o) => o,
             Ok(o) => o,
             Err(e) => {
             Err(e) => {
-                output.push(format!("[reset_to_height] Creating cache overlay failed: {e:?}"));
+                output.push(format!("[reset_to_height] Creating cache overlay failed: {e}"));
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
             }
             }
         };
         };
@@ -135,7 +134,7 @@ impl Drk {
                 Ok(d) => d,
                 Ok(d) => d,
                 Err(e) => {
                 Err(e) => {
                     output.push(format!(
                     output.push(format!(
-                        "[reset_to_height] Retrieving state inverse diff from cache failed: {e:?}"
+                        "[reset_to_height] Retrieving state inverse diff from cache failed: {e}"
                     ));
                     ));
                     return Err(WalletDbError::GenericError)
                     return Err(WalletDbError::GenericError)
                 }
                 }
@@ -143,26 +142,27 @@ impl Drk {
 
 
             // Apply it
             // Apply it
             if let Err(e) = overlay.0.add_diff(&inverse_diff) {
             if let Err(e) = overlay.0.add_diff(&inverse_diff) {
-                output.push(format!("[reset_to_height] Adding state inverse diff to the cache overlay failed: {e:?}"));
+                output.push(format!(
+                    "[reset_to_height] Adding state inverse diff to the cache overlay failed: {e}"
+                ));
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
             }
             }
             if let Err(e) = overlay.0.apply_diff(&inverse_diff) {
             if let Err(e) = overlay.0.apply_diff(&inverse_diff) {
-                output.push(format!("[reset_to_height] Applying state inverse diff to the cache overlay failed: {e:?}"));
+                output.push(format!("[reset_to_height] Applying state inverse diff to the cache overlay failed: {e}"));
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
             }
             }
 
 
             // Remove it
             // Remove it
             if let Err(e) = self.cache.state_inverse_diff.remove(height.to_be_bytes()) {
             if let Err(e) = self.cache.state_inverse_diff.remove(height.to_be_bytes()) {
                 output.push(format!(
                 output.push(format!(
-                    "[reset_to_height] Removing state inverse diff from the cache failed: {e:?}"
+                    "[reset_to_height] Removing state inverse diff from the cache failed: {e}"
                 ));
                 ));
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
             }
             }
 
 
             // Flush sled
             // Flush sled
             if let Err(e) = self.cache.sled_db.flush() {
             if let Err(e) = self.cache.sled_db.flush() {
-                output
-                    .push(format!("[reset_to_height] Flushing cache sled database failed: {e:?}"));
+                output.push(format!("[reset_to_height] Flushing cache sled database failed: {e}"));
                 return Err(WalletDbError::GenericError)
                 return Err(WalletDbError::GenericError)
             }
             }
         }
         }

+ 3 - 3
bin/drk/src/token.rs

@@ -113,7 +113,7 @@ impl Drk {
             ],
             ],
         ) {
         ) {
             return Err(Error::DatabaseError(format!(
             return Err(Error::DatabaseError(format!(
-                "[import_mint_authority] Inserting mint authority failed: {e:?}"
+                "[import_mint_authority] Inserting mint authority failed: {e}"
             )))
             )))
         };
         };
 
 
@@ -216,7 +216,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_mint_authorities] Tokens mint autorities retrieval failed: {e:?}"
+                    "[get_mint_authorities] Tokens mint autorities retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };
@@ -242,7 +242,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_token_mint_authority] Token mint autority retrieval failed: {e:?}"
+                    "[get_token_mint_authority] Token mint autority retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };

+ 1 - 1
bin/drk/src/txs_history.rs

@@ -85,7 +85,7 @@ impl Drk {
             Ok(r) => r,
             Ok(r) => r,
             Err(e) => {
             Err(e) => {
                 return Err(Error::DatabaseError(format!(
                 return Err(Error::DatabaseError(format!(
-                    "[get_tx_history_record] Transaction history record retrieval failed: {e:?}"
+                    "[get_tx_history_record] Transaction history record retrieval failed: {e}"
                 )))
                 )))
             }
             }
         };
         };