Convert tree to using univalue. Eliminate all json_spirit uses.

This commit is contained in:
Jeff Garzik
2014-08-20 15:15:16 -04:00
committed by Jack Grigg
parent 03912600e8
commit ed21d5bd4b
23 changed files with 320 additions and 204 deletions

View File

@@ -19,7 +19,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include "json/json_spirit_value.h"
#include "json_spirit_wrapper.h"
using namespace json_spirit;
using namespace std;
@@ -130,7 +130,7 @@ Value importprivkey(const Array& params, bool fHelp)
// Don't throw error in case a key is already there
if (pwalletMain->HaveKey(vchAddress))
return Value::null;
return NullUniValue;
pwalletMain->mapKeyMetadata[vchAddress].nCreateTime = 1;
@@ -145,7 +145,7 @@ Value importprivkey(const Array& params, bool fHelp)
}
}
return Value::null;
return NullUniValue;
}
Value importaddress(const Array& params, bool fHelp)
@@ -204,7 +204,7 @@ Value importaddress(const Array& params, bool fHelp)
// Don't throw error in case an address is already there
if (pwalletMain->HaveWatchOnly(script))
return Value::null;
return NullUniValue;
pwalletMain->MarkDirty();
@@ -218,7 +218,7 @@ Value importaddress(const Array& params, bool fHelp)
}
}
return Value::null;
return NullUniValue;
}
Value z_importwallet(const Array& params, bool fHelp)
@@ -378,7 +378,7 @@ Value importwallet_impl(const Array& params, bool fHelp, bool fImportZKeys)
if (!fGood)
throw JSONRPCError(RPC_WALLET_ERROR, "Error adding some keys to wallet");
return Value::null;
return NullUniValue;
}
Value dumpprivkey(const Array& params, bool fHelp)