Move Parse{Hash|Hex} to be usable by all RPC code

This commit is contained in:
Peter Todd
2013-07-15 02:24:33 -04:00
parent 11a79680b1
commit 463c9710f5
3 changed files with 37 additions and 33 deletions

View File

@@ -130,6 +130,15 @@ public:
extern const CRPCTable tableRPC;
//
// Utilities: convert hex-encoded Values
// (throws error if not hex).
//
extern uint256 ParseHashV(const json_spirit::Value& v, std::string strName);
extern uint256 ParseHashO(const json_spirit::Object& o, std::string strKey);
extern std::vector<unsigned char> ParseHexV(const json_spirit::Value& v, std::string strName);
extern std::vector<unsigned char> ParseHexO(const json_spirit::Object& o, std::string strKey);
extern void InitRPCMining();
extern void ShutdownRPCMining();