remove JSON Spirit UniValue wrapper

This commit is contained in:
Jonas Schnelli
2015-05-13 21:29:19 +02:00
committed by Jack Grigg
parent 565d26737a
commit 851f58f94e
23 changed files with 255 additions and 274 deletions

View File

@@ -115,7 +115,7 @@ Value getnetworksolps(const Array& params, bool fHelp)
return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120, params.size() > 1 ? params[1].get_int() : -1);
}
Value getnetworkhashps(const Array& params, bool fHelp)
UniValue getnetworkhashps(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)
throw runtime_error(
@@ -139,7 +139,7 @@ Value getnetworkhashps(const Array& params, bool fHelp)
}
#ifdef ENABLE_MINING
Value getgenerate(const Array& params, bool fHelp)
UniValue getgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
@@ -158,7 +158,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(
@@ -267,7 +267,7 @@ endloop:
}
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(
@@ -326,7 +326,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(
@@ -376,7 +376,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(
@@ -408,7 +408,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;
@@ -426,7 +426,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(
@@ -502,7 +502,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
}
std::string strMode = "template";
Value lpval = NullUniValue;
UniValue lpval = NullUniValue;
// TODO: Re-enable coinbasevalue once a specification has been written
bool coinbasetxn = true;
if (params.size() > 0)
@@ -748,7 +748,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(
@@ -809,7 +809,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(
@@ -841,7 +841,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(