@@ -96,11 +96,11 @@ impl Carrier {
9696 Err ( JsonRpcError ( RpcError ( rpcerr) ) ) => match rpcerr. code {
9797 // Since we're pushing a raw transaction to the network we can face several rejections
9898 rpc_errors:: RPC_VERIFY_REJECTED => {
99- log:: error!( "Transaction couldn't be broadcast. {:?}" , rpcerr ) ;
99+ log:: error!( "Transaction couldn't be broadcast. {rpcerr :?}" ) ;
100100 ConfirmationStatus :: Rejected ( rpc_errors:: RPC_VERIFY_REJECTED )
101101 }
102102 rpc_errors:: RPC_VERIFY_ERROR => {
103- log:: error!( "Transaction couldn't be broadcast. {:?}" , rpcerr ) ;
103+ log:: error!( "Transaction couldn't be broadcast. {rpcerr :?}" ) ;
104104 ConfirmationStatus :: Rejected ( rpc_errors:: RPC_VERIFY_ERROR )
105105 }
106106 rpc_errors:: RPC_VERIFY_ALREADY_IN_CHAIN => {
@@ -122,10 +122,7 @@ impl Carrier {
122122 }
123123 _ => {
124124 // If something else happens (unlikely but possible) log it so we can treat it in future releases.
125- log:: error!(
126- "Unexpected rpc error when calling sendrawtransaction: {:?}" ,
127- rpcerr
128- ) ;
125+ log:: error!( "Unexpected rpc error when calling sendrawtransaction: {rpcerr:?}" ) ;
129126 ConfirmationStatus :: Rejected ( errors:: UNKNOWN_JSON_RPC_EXCEPTION )
130127 }
131128 } ,
@@ -137,7 +134,7 @@ impl Carrier {
137134 }
138135 Err ( e) => {
139136 // TODO: This may need finer catching.
140- log:: error!( "Unexpected error when calling sendrawtransaction: {:?}" , e ) ;
137+ log:: error!( "Unexpected error when calling sendrawtransaction: {e :?}" ) ;
141138 ConfirmationStatus :: Rejected ( errors:: UNKNOWN_JSON_RPC_EXCEPTION )
142139 }
143140 } ;
@@ -159,15 +156,12 @@ impl Carrier {
159156 Ok ( tx) => tx. blockhash . is_none ( ) ,
160157 Err ( JsonRpcError ( RpcError ( rpcerr) ) ) => match rpcerr. code {
161158 rpc_errors:: RPC_INVALID_ADDRESS_OR_KEY => {
162- log:: info!( "Transaction not found in mempool: {}" , txid ) ;
159+ log:: info!( "Transaction not found in mempool: {txid}" ) ;
163160 false
164161 }
165162 e => {
166163 // DISCUSS: This could result in a silent error with unknown consequences
167- log:: error!(
168- "Unexpected error code when calling getrawtransaction: {}" ,
169- e
170- ) ;
164+ log:: error!( "Unexpected error code when calling getrawtransaction: {e}" ) ;
171165 false
172166 }
173167 } ,
@@ -180,10 +174,7 @@ impl Carrier {
180174 // TODO: This may need finer catching.
181175 Err ( e) => {
182176 // DISCUSS: This could result in a silent error with unknown consequences
183- log:: error!(
184- "Unexpected JSONRPCError when calling getrawtransaction: {}" ,
185- e
186- ) ;
177+ log:: error!( "Unexpected JSONRPCError when calling getrawtransaction: {e}" ) ;
187178 false
188179 }
189180 }
0 commit comments