mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
test, build: Separate read_json function into its own module
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <script/sign.h>
|
||||
#include <script/signingprovider.h>
|
||||
#include <streams.h>
|
||||
#include <test/util/json.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <test/util/transaction_utils.h>
|
||||
#include <util/strencodings.h>
|
||||
@@ -41,18 +42,6 @@ static const unsigned int gFlags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
|
||||
unsigned int ParseScriptFlags(std::string strFlags);
|
||||
std::string FormatScriptFlags(unsigned int flags);
|
||||
|
||||
UniValue read_json(const std::string& jsondata)
|
||||
{
|
||||
UniValue v;
|
||||
|
||||
if (!v.read(jsondata) || !v.isArray())
|
||||
{
|
||||
BOOST_ERROR("Parse error.");
|
||||
return UniValue(UniValue::VARR);
|
||||
}
|
||||
return v.get_array();
|
||||
}
|
||||
|
||||
struct ScriptErrorDesc
|
||||
{
|
||||
ScriptError_t err;
|
||||
|
||||
Reference in New Issue
Block a user