CatapultServer
v0.5.0.1 (Elephant)
|
DEFINE_STATEFUL_VALIDATOR(EligibleHarvester, [](const auto ¬ification, const auto &context) { cache::ImportanceView view(context.Cache.template sub< cache::AccountStateCache >());return view.canHarvest(notification.Signer, context.Height) ? ValidationResult::Success :Failure_Core_Block_Harvester_Ineligible;})
std::unique_ptr< RemoteNodeApi > CreateRemoteNodeApi(ionet::PacketIo &io)
Creates a node api for interacting with a remote node with the specified io.
Definition: RemoteNodeApi.cpp:87
bool TryParseNodesPacket(const ionet::Packet &packet, ionet::NodeSet &nodes)
Tries to parse packet into nodes.
Definition: NodePingUtils.cpp:39
virtual ~RemoteNodeApi()=default
utils::ByteArray< Address_Decoded_Size, UnresolvedAddress_tag > UnresolvedAddress
Definition: src/catapult/types.h:66
bool IsRemote(AccountType accountType)
Returns true if accountType corresponds to a remote account.
Definition: AccountState.cpp:41
std::function< bool(TArgs...)> predicate
A predicate function.
Definition: functions.h:31
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
An api for retrieving node information from a remote node.
Definition: RemoteNodeApi.h:30
static constexpr auto Friendly_Name
Definition: RemoteNodeApi.cpp:34
static constexpr auto Packet_Type
Definition: RemoteNodeApi.cpp:33
An interface for reading and writing packets.
Definition: PacketIo.h:31
bool TryParseNodePacket(const ionet::Packet &packet, ionet::Node &node)
Tries to parse packet into node.
Definition: NodePingUtils.cpp:28
std::unordered_set< Node, NodeHasher > NodeSet
A set of nodes.
Definition: Node.h:128
Provides a way to access the result of an asynchronous operation.
Definition: Future.h:29
RemoteRequestDispatcher m_impl
Definition: RemoteNodeApi.cpp:83
virtual thread::future< ionet::NodeSet > peersInfo() const =0
Gets information about the node's peers.
utils::ByteArray< Address_Decoded_Size, Address_tag > Address
Definition: src/catapult/types.h:63
virtual thread::future< ionet::Node > nodeInfo() const =0
Gets information about the node.
ionet::Node Node
Definition: PacketWriters.cpp:45
Definition: AddressExtractionExtension.cpp:28
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41