diff --git a/src/server/p2p/client.rs b/src/server/p2p/client.rs index 7b4b37e5..b262a338 100644 --- a/src/server/p2p/client.rs +++ b/src/server/p2p/client.rs @@ -4,8 +4,8 @@ use std::time::{Duration, Instant}; use log::{debug, error, warn}; use thiserror::Error; use tokio::select; -use tokio::sync::broadcast::error::{RecvError, SendError}; use tokio::sync::{broadcast, mpsc, Mutex}; +use tokio::sync::broadcast::error::{RecvError, SendError}; use tokio::time::sleep; use crate::server::p2p::messages::{ValidateBlockRequest, ValidateBlockResult}; diff --git a/src/server/p2p/p2p.rs b/src/server/p2p/p2p.rs index cda588a8..7cf9db51 100644 --- a/src/server/p2p/p2p.rs +++ b/src/server/p2p/p2p.rs @@ -493,6 +493,7 @@ impl Service debug!(target: LOG_TARGET, "Share chain sync response: {response:?}"); if let Err(error) = self.share_chain.submit_blocks(response.blocks, true).await { error!(target: LOG_TARGET, "Failed to add synced blocks to share chain: {error:?}"); + self.sync_share_chain().await; } }