Fix various oversights/bugs in ZMQ RPC server code

- Add some RPC commands (and touch up a couple others)
- some bounds checking
- some better pointer management
- const correctness and error handling

-- Thanks @vtnerd for type help with serialization and CMake changes
This commit is contained in:
Thomas Winget
2017-09-05 12:20:40 -04:00
parent 77986023c3
commit 0299cb77ca
15 changed files with 536 additions and 225 deletions

View File

@@ -92,6 +92,8 @@ class DaemonHandler : public RpcHandler
void handle(const GetBlockHeaderByHeight::Request& req, GetBlockHeaderByHeight::Response& res);
void handle(const GetBlockHeadersByHeight::Request& req, GetBlockHeadersByHeight::Response& res);
void handle(const GetBlock::Request& req, GetBlock::Response& res);
void handle(const GetPeerList::Request& req, GetPeerList::Response& res);
@@ -108,10 +110,6 @@ class DaemonHandler : public RpcHandler
void handle(const StopDaemon::Request& req, StopDaemon::Response& res);
void handle(const FastExit::Request& req, FastExit::Response& res);
void handle(const OutPeers::Request& req, OutPeers::Response& res);
void handle(const StartSaveGraph::Request& req, StartSaveGraph::Response& res);
void handle(const StopSaveGraph::Request& req, StopSaveGraph::Response& res);