node: Add ability to have default tracking policy

When a specific tracking policy isn't found, we allow setting a default.
To preserve existing behavior, the default is `Block`, ie. if a node
isn't tracked explicitly, it is blocked.

However, this change allows for using `Track` as the default, which
is a way to track everything without having to know the entities in
advance.
This commit is contained in:
Alexis Sellier
2023-02-12 16:22:51 +01:00
parent bdc0ab9881
commit bd7c5a0daa
6 changed files with 91 additions and 7 deletions
+2 -1
View File
@@ -111,7 +111,8 @@ impl<G: Signer + EcSign + 'static> Runtime<G> {
let routing = routing::Table::open(routing_db)?;
log::info!(target: "node", "Opening tracking policy table {}..", tracking_db.display());
let tracking = tracking::Config::open(tracking_db)?;
let tracking = tracking::Store::open(tracking_db)?;
let tracking = tracking::Config::new(config.policy, tracking);
log::info!(target: "node", "Initializing service ({:?})..", network);
let service = service::Service::new(