diff --git a/base_layer/tari_mining_helper_ffi/src/lib.rs b/base_layer/tari_mining_helper_ffi/src/lib.rs index 09a8948cae..baf22ccbb2 100644 --- a/base_layer/tari_mining_helper_ffi/src/lib.rs +++ b/base_layer/tari_mining_helper_ffi/src/lib.rs @@ -99,7 +99,7 @@ pub unsafe extern "C" fn byte_vector_create( #[no_mangle] pub unsafe extern "C" fn byte_vector_destroy(bytes: *mut ByteVector) { if !bytes.is_null() { - Box::from_raw(bytes); + drop(Box::from_raw(bytes)); } } diff --git a/comms/core/src/connection_manager/requester.rs b/comms/core/src/connection_manager/requester.rs index cc0ca17d2c..3eac5c08f7 100644 --- a/comms/core/src/connection_manager/requester.rs +++ b/comms/core/src/connection_manager/requester.rs @@ -107,13 +107,6 @@ impl ConnectionManagerRequester { Ok(()) } - /// Send instruction to ConnectionManager to dial a peer without waiting for a result. - #[tracing::instrument(level = "trace", skip(self))] - pub(crate) async fn send_dial_peer_no_reply(&mut self, node_id: NodeId) -> Result<(), ConnectionManagerError> { - self.send_dial_peer(node_id, None).await?; - Ok(()) - } - /// Return the ListenerInfo for the configured listener once the listener(s) are bound to the socket. /// /// This is useful when using "assigned port" addresses, such as /ip4/0.0.0.0/tcp/0 or /memory/0 for listening and diff --git a/comms/core/src/protocol/rpc/server/chunking.rs b/comms/core/src/protocol/rpc/server/chunking.rs index 85aa986ade..e505547fee 100644 --- a/comms/core/src/protocol/rpc/server/chunking.rs +++ b/comms/core/src/protocol/rpc/server/chunking.rs @@ -83,7 +83,7 @@ impl ChunkedResponseIter { &self.message.payload } - fn next_chunk(&mut self) -> Option { + fn get_next_chunk(&mut self) -> Option { let len = self.payload().len(); if len == 0 { if self.num_chunks > 1 { @@ -171,7 +171,7 @@ impl Iterator for ChunkedResponseIter { } let request_id = self.message.request_id; - let chunk = self.next_chunk()?; + let chunk = self.get_next_chunk()?; // status MUST be set for the first chunked message, all subsequent chunk messages MUST have a status of 0 let mut status = 0; diff --git a/comms/dht/src/store_forward/error.rs b/comms/dht/src/store_forward/error.rs index e3cc4b1e8b..4a71b410eb 100644 --- a/comms/dht/src/store_forward/error.rs +++ b/comms/dht/src/store_forward/error.rs @@ -93,7 +93,7 @@ pub enum StoreAndForwardError { RequestMessagesFailed(DhtOutboundError), #[error("Received SAF messages that were not requested")] ReceivedUnrequestedSafMessages, - #[error("SAF messages received from peer {peer} after deadline. Received after {0:.2?}")] + #[error("SAF messages received from peer {peer} after deadline. Received after {message_age:.2?}")] SafMessagesReceivedAfterDeadline { peer: NodeId, message_age: Duration }, #[error("Invalid SAF request: `stored_at` cannot be in the future")] StoredAtWasInFuture,