diff --git a/mempool/src/pool/mod.rs b/mempool/src/pool/mod.rs index f9890d8848..4391bf4778 100644 --- a/mempool/src/pool/mod.rs +++ b/mempool/src/pool/mod.rs @@ -336,10 +336,9 @@ impl<'a> TxFinalizer<'a> { let origin = transaction.origin(); log::trace!("Rejected transaction {tx_id}, checking orphan status"); - self.try_add_orphan(tx_pool, transaction, error).map_err(|err| { + self.try_add_orphan(tx_pool, transaction, error).inspect_err(|err| { let evt = event::TransactionProcessed::rejected(tx_id, err.clone(), origin); self.events_controller.broadcast(evt.into()); - err }) } } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index b2e4a09e79..b96cfc1911 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -141,8 +141,8 @@ impl Rpc { .set_http_middleware(middleware.clone()) .build(http_bind_addr) .await - .map_err(|e| { - logging::log::error!("\n\nError: Failed to bind RPC to address {http_bind_addr}; the port is probably reserved by another application. Assuming the node is not already running, either pick another port (bind address) or disable RPC.\n"); e + .inspect_err(|_| { + logging::log::error!("\n\nError: Failed to bind RPC to address {http_bind_addr}; the port is probably reserved by another application. Assuming the node is not already running, either pick another port (bind address) or disable RPC.\n"); })?; let http_address = http_server.local_addr()?; let http_handle = http_server.start(methods.clone());