Control message to update peers. (#351)

This commit is contained in:
Ravin Perera
2021-11-02 14:13:21 +05:30
committed by GitHub
parent 33999f5726
commit c720a777ce
16 changed files with 263 additions and 65 deletions

View File

@@ -2,6 +2,7 @@
#define _HP_MSG_JSON_CONTROLMSG_JSON_
#include "../../pchheader.hpp"
#include "../../p2p/p2p.hpp"
/**
* Parser helpers for smart contract control messages.
@@ -12,6 +13,9 @@ namespace msg::controlmsg::json
int extract_type(std::string &extracted_type, const jsoncons::json &d);
int extract_peer_changeset(std::vector<p2p::peer_properties> &added_peers, std::vector<p2p::peer_properties> &removed_peers, const jsoncons::json &d);
int extract_peers_from_array(std::vector<p2p::peer_properties> &peers, std::string_view field, const jsoncons::json &d);
} // namespace msg::controlmsg::json