This commit is contained in:
John Smith
2022-12-14 16:50:33 -05:00
parent 78d06fb187
commit f0674e46d1
6 changed files with 235 additions and 60 deletions

View File

@@ -101,9 +101,11 @@ impl TableStore {
let db = Database::open(table_name.clone(), column_count)
.await
.wrap_err("failed to open tabledb")?;
info!(
trace!(
"opened table store '{}' with table name '{:?}' with {} columns",
name, table_name, column_count
name,
table_name,
column_count
);
let table_db = TableDB::new(table_name.clone(), self.clone(), db);

View File

@@ -445,6 +445,10 @@ impl VeilidAPI {
Ok("Connections purged".to_owned())
} else if args[0] == "routes" {
// Purge route spec store
{
let mut dc = DEBUG_CACHE.lock();
dc.imported_routes.clear();
}
let rss = self.network_manager()?.routing_table().route_spec_store();
match rss.purge().await {
Ok(_) => Ok("Routes purged".to_owned()),
@@ -865,12 +869,9 @@ impl VeilidAPI {
} else if arg == "route" {
self.debug_route(rest).await
} else {
Ok(">>> Unknown command\n".to_owned())
Err(VeilidAPIError::generic("Unknown debug command"))
}
};
// if let Ok(res) = &res {
// debug!("{}", res);
// }
res
}
}