mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
remove JSON Spirit UniValue wrapper
This commit is contained in:
@@ -38,7 +38,7 @@ using namespace std;
|
||||
*
|
||||
* Or alternatively, create a specific query method for the information.
|
||||
**/
|
||||
Value getinfo(const Array& params, bool fHelp)
|
||||
UniValue getinfo(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
@@ -115,9 +115,9 @@ private:
|
||||
public:
|
||||
DescribeAddressVisitor(isminetype mineIn) : mine(mineIn) {}
|
||||
|
||||
Object operator()(const CNoDestination &dest) const { return Object(); }
|
||||
UniValue operator()(const CNoDestination &dest) const { return Object(); }
|
||||
|
||||
Object operator()(const CKeyID &keyID) const {
|
||||
UniValue operator()(const CKeyID &keyID) const {
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
CPubKey vchPubKey;
|
||||
obj.push_back(Pair("isscript", false));
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
return obj;
|
||||
}
|
||||
|
||||
Object operator()(const CScriptID &scriptID) const {
|
||||
UniValue operator()(const CScriptID &scriptID) const {
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
obj.push_back(Pair("isscript", true));
|
||||
if (mine != ISMINE_NO) {
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
Value validateaddress(const Array& params, bool fHelp)
|
||||
UniValue validateaddress(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
@@ -202,7 +202,7 @@ Value validateaddress(const Array& params, bool fHelp)
|
||||
ret.push_back(Pair("ismine", (mine & ISMINE_SPENDABLE) ? true : false));
|
||||
if (mine != ISMINE_NO) {
|
||||
ret.push_back(Pair("iswatchonly", (mine & ISMINE_WATCH_ONLY) ? true: false));
|
||||
Object detail = boost::apply_visitor(DescribeAddressVisitor(mine), dest);
|
||||
UniValue detail = boost::apply_visitor(DescribeAddressVisitor(mine), dest);
|
||||
ret.pushKVs(detail);
|
||||
}
|
||||
if (pwalletMain && pwalletMain->mapAddressBook.count(dest))
|
||||
@@ -276,7 +276,7 @@ CScript _createmultisig_redeemScript(const Array& params)
|
||||
return result;
|
||||
}
|
||||
|
||||
Value createmultisig(const Array& params, bool fHelp)
|
||||
UniValue createmultisig(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() < 2 || params.size() > 2)
|
||||
{
|
||||
@@ -319,7 +319,7 @@ Value createmultisig(const Array& params, bool fHelp)
|
||||
return result;
|
||||
}
|
||||
|
||||
Value verifymessage(const Array& params, bool fHelp)
|
||||
UniValue verifymessage(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 3)
|
||||
throw runtime_error(
|
||||
@@ -373,7 +373,7 @@ Value verifymessage(const Array& params, bool fHelp)
|
||||
return (pubkey.GetID() == keyID);
|
||||
}
|
||||
|
||||
Value setmocktime(const Array& params, bool fHelp)
|
||||
UniValue setmocktime(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
|
||||
Reference in New Issue
Block a user