diff --git a/irohad/ametsuchi/block_serializer.hpp b/irohad/ametsuchi/block_serializer.hpp index a2bf901140..b51a0c51da 100644 --- a/irohad/ametsuchi/block_serializer.hpp +++ b/irohad/ametsuchi/block_serializer.hpp @@ -44,6 +44,7 @@ using namespace rapidjson; class BlockSerializer{ public: std::vector serialize(model::Block block); + model::Block deserialize(std::vector bytes); private: void serialize(PrettyWriter& writer, model::Block block); void serialize(PrettyWriter& writer, model::Signature signature); diff --git a/irohad/ametsuchi/impl/block_serializer.cpp b/irohad/ametsuchi/impl/block_serializer.cpp index 27f5ff2e5a..2cdfa642da 100644 --- a/irohad/ametsuchi/impl/block_serializer.cpp +++ b/irohad/ametsuchi/impl/block_serializer.cpp @@ -22,6 +22,8 @@ namespace iroha { using namespace rapidjson; + /* Serialize */ + std::vector BlockSerializer::serialize(model::Block block) { rapidjson::StringBuffer sb; rapidjson::PrettyWriter writer(sb); @@ -382,5 +384,12 @@ namespace iroha { writer.EndObject(); } + + /* Deserialize */ + + model::Block BlockSerializer::deserialize(std::vector bytes) { + + } + } } diff --git a/irohad/ametsuchi/wsv_query.hpp b/irohad/ametsuchi/wsv_query.hpp index c0cfda08d8..6d0ae0d272 100644 --- a/irohad/ametsuchi/wsv_query.hpp +++ b/irohad/ametsuchi/wsv_query.hpp @@ -73,7 +73,7 @@ namespace iroha { * @param address * @return */ - virtual nonstd::optional getPeers() = 0; + virtual nonstd::optional getPeer(const std::string &address) = 0; }; } // namespace ametsuchi