peer table thresholds

This commit is contained in:
John Smith
2022-03-24 10:14:50 -04:00
parent ac0280e0b6
commit c276dd7796
10 changed files with 184 additions and 47 deletions

View File

@@ -115,16 +115,9 @@ impl ServicesContext {
// Set up attachment manager
trace!("init attachment manager");
let update_callback_move = self.update_callback.clone();
let update_callback = self.update_callback.clone();
let attachment_manager = AttachmentManager::new(self.config.clone(), table_store, crypto);
if let Err(e) = attachment_manager
.init(Arc::new(
move |_old_state: AttachmentState, new_state: AttachmentState| {
update_callback_move(VeilidUpdate::Attachment { state: new_state })
},
))
.await
{
if let Err(e) = attachment_manager.init(update_callback).await {
self.shutdown().await;
return Err(VeilidAPIError::Internal { message: e });
}