Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsa committed Dec 6, 2024
1 parent d54114d commit a4b68eb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/authority_discovery/query/audi_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ namespace kagome::authority_discovery {
* Remove authority discovery data
* @param authority the authority to remove
*/
virtual outcome::result<void> remove(const primitives::AuthorityDiscoveryId &authority) = 0;
virtual outcome::result<void> remove(
const primitives::AuthorityDiscoveryId &authority) = 0;

/**
* Check if the store contains the authority
Expand All @@ -52,10 +53,16 @@ namespace kagome::authority_discovery {
virtual bool contains(
const primitives::AuthorityDiscoveryId &authority) const = 0;

/**
* Apply a function to each entry in the store
*/
virtual void forEach(
std::function<void(const primitives::AuthorityDiscoveryId &,
const AuthorityPeerInfo &)> f) const = 0;

/**
* Retain only the entries that satisfy the predicate
*/
virtual void retainIf(
std::function<bool(const primitives::AuthorityDiscoveryId &,
const AuthorityPeerInfo &)> f) = 0;
Expand Down

0 comments on commit a4b68eb

Please sign in to comment.