handshake process

This commit is contained in:
viraladmin 2026-06-12 10:49:34 -06:00
parent a4c4518adf
commit 7181cc4e26
2 changed files with 8 additions and 0 deletions

View File

@ -191,6 +191,10 @@ pub async fn bootstrap_peer_discovery(mut params: BootstrapParams) -> Result<(),
let post_sync_remote_height = let post_sync_remote_height =
request_remote_height(stream.clone(), params.map.clone(), current_key.clone()).await?; request_remote_height(stream.clone(), params.map.clone(), current_key.clone()).await?;
if let Err(err) = NodeInfo::rebuild_mined_counts_from_chain(&params.db).await {
error!("[startup] failed to rebuild mined counts before startup orphan check: {err}");
}
let imported_candidates = let imported_candidates =
match hydrate_torrent_candidates(stream.clone(), params.map.clone(), current_key.clone()) match hydrate_torrent_candidates(stream.clone(), params.map.clone(), current_key.clone())
.await .await

View File

@ -99,6 +99,10 @@ async fn sync_incoming_peer_before_operational(
let post_sync_remote_height = let post_sync_remote_height =
request_remote_height(stream.clone(), map.clone(), connections_key.to_string()).await?; request_remote_height(stream.clone(), map.clone(), connections_key.to_string()).await?;
if let Err(err) = NodeInfo::rebuild_mined_counts_from_chain(db).await {
error!("[startup] failed to rebuild mined counts before incoming orphan check: {err}");
}
let imported_candidates = match hydrate_torrent_candidates( let imported_candidates = match hydrate_torrent_candidates(
stream.clone(), stream.clone(),
map.clone(), map.clone(),