|
CatapultServer
v0.5.0.1 (Elephant)
|
A node selector that selects nodes according to the importance of the account used to boot the node. More...

Public Types | |
| using | NodeSelector = std::function< ionet::NodeSet(extensions::WeightedCandidates &, uint64_t, size_t)> |
Public Member Functions | |
| ImportanceAwareNodeSelector (ionet::ServiceIdentifier serviceId, uint8_t maxNodes, Importance minImportance) | |
| ImportanceAwareNodeSelector (ionet::ServiceIdentifier serviceId, uint8_t maxNodes, Importance minImportance, const NodeSelector &selector) | |
| ionet::NodeSet | selectNodes (const cache::ImportanceView &importanceView, const ionet::NodeContainerView &nodeContainerView, Height height) const |
| Selects nodes from nodeContainerView that have a minimum importance at height according to importanceView. More... | |
Private Member Functions | |
| std::pair< bool, Importance > | isCandidate (const cache::ImportanceView &importanceView, const ionet::Node &node, const ionet::NodeInfo &nodeInfo, Height height) const |
Private Attributes | |
| ionet::ServiceIdentifier | m_serviceId |
| uint8_t | m_maxNodes |
| Importance | m_minImportance |
| NodeSelector | m_selector |
A node selector that selects nodes according to the importance of the account used to boot the node.
| using catapult::timesync::ImportanceAwareNodeSelector::NodeSelector = std::function<ionet::NodeSet (extensions::WeightedCandidates&, uint64_t, size_t)> |
|
explicit |
Creates a selector that can pick up to maxNodes nodes with a minimum importance of minImportance that have active connections with service id serviceId.
|
explicit |
Creates a selector around a custom selector that can pick up to maxNodes nodes with a minimum importance of minImportance that have active connections with service id serviceId.
|
private |


| ionet::NodeSet catapult::timesync::ImportanceAwareNodeSelector::selectNodes | ( | const cache::ImportanceView & | importanceView, |
| const ionet::NodeContainerView & | nodeContainerView, | ||
| Height | height | ||
| ) | const |
Selects nodes from nodeContainerView that have a minimum importance at height according to importanceView.

|
private |
|
private |
|
private |
|
private |