diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-05-13 21:29:19 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-04 09:16:06 +0200 |
commit | 3df0411ad9fd75fb27af53e44835d41f5480fe3f (patch) | |
tree | 99e1a50e6b36e69c4429129d87567890b5878b3c /src/rpcmining.cpp | |
parent | 1f263c899ee0756ed9ed133f35bec18bdef20cdc (diff) |
remove JSON Spirit UniValue wrapper
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r-- | src/rpcmining.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index c2ad75af69..89e20526ed 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -34,7 +34,7 @@ using namespace std; * or from the last difficulty change if 'lookup' is nonpositive. * If 'height' is nonnegative, compute the estimate at the time when a given block was found. */ -Value GetNetworkHashPS(int lookup, int height) { +UniValue GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb = chainActive.Tip(); if (height >= 0 && height < chainActive.Height()) @@ -71,7 +71,7 @@ Value GetNetworkHashPS(int lookup, int height) { return (int64_t)(workDiff.getdouble() / timeDiff); } -Value getnetworkhashps(const Array& params, bool fHelp) +UniValue getnetworkhashps(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( @@ -94,7 +94,7 @@ Value getnetworkhashps(const Array& params, bool fHelp) } #ifdef ENABLE_WALLET -Value getgenerate(const Array& params, bool fHelp) +UniValue getgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( @@ -113,7 +113,7 @@ Value getgenerate(const Array& params, bool fHelp) return GetBoolArg("-gen", false); } -Value generate(const Array& params, bool fHelp) +UniValue generate(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 1) throw runtime_error( @@ -172,7 +172,7 @@ Value generate(const Array& params, bool fHelp) } -Value setgenerate(const Array& params, bool fHelp) +UniValue setgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( @@ -220,7 +220,7 @@ Value setgenerate(const Array& params, bool fHelp) #endif -Value getmininginfo(const Array& params, bool fHelp) +UniValue getmininginfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( @@ -266,7 +266,7 @@ Value getmininginfo(const Array& params, bool fHelp) // NOTE: Unlike wallet RPC (which use BTC values), mining RPCs follow GBT (BIP 22) in using satoshi amounts -Value prioritisetransaction(const Array& params, bool fHelp) +UniValue prioritisetransaction(const Array& params, bool fHelp) { if (fHelp || params.size() != 3) throw runtime_error( @@ -298,7 +298,7 @@ Value prioritisetransaction(const Array& params, bool fHelp) // NOTE: Assumes a conclusive result; if result is inconclusive, it must be handled by caller -static Value BIP22ValidationResult(const CValidationState& state) +static UniValue BIP22ValidationResult(const CValidationState& state) { if (state.IsValid()) return Value::null; @@ -316,7 +316,7 @@ static Value BIP22ValidationResult(const CValidationState& state) return "valid?"; } -Value getblocktemplate(const Array& params, bool fHelp) +UniValue getblocktemplate(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( @@ -381,7 +381,7 @@ Value getblocktemplate(const Array& params, bool fHelp) LOCK(cs_main); std::string strMode = "template"; - Value lpval = NullUniValue; + UniValue lpval = NullUniValue; if (params.size() > 0) { const Object& oparam = params[0].get_obj(); @@ -605,7 +605,7 @@ protected: }; }; -Value submitblock(const Array& params, bool fHelp) +UniValue submitblock(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( @@ -666,7 +666,7 @@ Value submitblock(const Array& params, bool fHelp) return BIP22ValidationResult(state); } -Value estimatefee(const Array& params, bool fHelp) +UniValue estimatefee(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( @@ -698,7 +698,7 @@ Value estimatefee(const Array& params, bool fHelp) return ValueFromAmount(feeRate.GetFeePerK()); } -Value estimatepriority(const Array& params, bool fHelp) +UniValue estimatepriority(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( |