Migrate Zcash-specific code to UniValue
This commit is contained in:
@@ -15,13 +15,9 @@
|
||||
#include <utility>
|
||||
#include <future>
|
||||
|
||||
#include "json/json_spirit_value.h"
|
||||
#include "json/json_spirit_utils.h"
|
||||
#include "json/json_spirit_reader_template.h"
|
||||
#include "json/json_spirit_writer_template.h"
|
||||
#include "univalue/univalue.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace json_spirit;
|
||||
|
||||
/**
|
||||
* AsyncRPCOperation objects are submitted to the AsyncRPCQueue for processing.
|
||||
@@ -67,11 +63,11 @@ public:
|
||||
}
|
||||
|
||||
// Override this method to add data to the default status object.
|
||||
virtual Value getStatus() const;
|
||||
virtual UniValue getStatus() const;
|
||||
|
||||
Value getError() const;
|
||||
UniValue getError() const;
|
||||
|
||||
Value getResult() const;
|
||||
UniValue getResult() const;
|
||||
|
||||
std::string getStateAsString() const;
|
||||
|
||||
@@ -114,7 +110,7 @@ protected:
|
||||
// internal state. Currently, all operations are executed in a single-thread
|
||||
// by a single worker.
|
||||
mutable std::mutex lock_; // lock on this when read/writing non-atomics
|
||||
Value result_;
|
||||
UniValue result_;
|
||||
int error_code_;
|
||||
std::string error_message_;
|
||||
std::atomic<OperationStatus> state_;
|
||||
@@ -137,7 +133,7 @@ protected:
|
||||
this->error_message_ = errorMessage;
|
||||
}
|
||||
|
||||
void set_result(Value v) {
|
||||
void set_result(UniValue v) {
|
||||
std::lock_guard<std::mutex> guard(lock_);
|
||||
this->result_ = v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user