mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: creditOutputs
in AssetLock tx json output should be an array of objects, not debug strings
This commit is contained in:
parent
045e178730
commit
ba0e64505b
@ -9,6 +9,7 @@
|
|||||||
#include <primitives/transaction.h>
|
#include <primitives/transaction.h>
|
||||||
#include <gsl/pointers.h>
|
#include <gsl/pointers.h>
|
||||||
|
|
||||||
|
#include <core_io.h>
|
||||||
#include <serialize.h>
|
#include <serialize.h>
|
||||||
#include <univalue.h>
|
#include <univalue.h>
|
||||||
|
|
||||||
@ -51,14 +52,18 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] UniValue ToJson() const
|
[[nodiscard]] UniValue ToJson() const
|
||||||
{
|
{
|
||||||
UniValue obj;
|
UniValue outputs(UniValue::VARR);
|
||||||
obj.setObject();
|
for (const CTxOut& credit_output : creditOutputs) {
|
||||||
obj.pushKV("version", int(nVersion));
|
UniValue out(UniValue::VOBJ);
|
||||||
UniValue outputs;
|
out.pushKV("value", ValueFromAmount(credit_output.nValue));
|
||||||
outputs.setArray();
|
out.pushKV("valueSat", credit_output.nValue);
|
||||||
for (const CTxOut& out : creditOutputs) {
|
UniValue spk(UniValue::VOBJ);
|
||||||
outputs.push_back(out.ToString());
|
ScriptPubKeyToUniv(credit_output.scriptPubKey, spk, /* fIncludeHex = */ true, /* include_addresses = */ false);
|
||||||
|
out.pushKV("scriptPubKey", spk);
|
||||||
|
outputs.push_back(out);
|
||||||
}
|
}
|
||||||
|
UniValue obj(UniValue::VOBJ);
|
||||||
|
obj.pushKV("version", int(nVersion));
|
||||||
obj.pushKV("creditOutputs", outputs);
|
obj.pushKV("creditOutputs", outputs);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,7 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
|
|||||||
"llmq/chainlocks -> net_processing -> llmq/context -> llmq/chainlocks"
|
"llmq/chainlocks -> net_processing -> llmq/context -> llmq/chainlocks"
|
||||||
"coinjoin/client -> coinjoin/coinjoin -> llmq/chainlocks -> net_processing -> coinjoin/client"
|
"coinjoin/client -> coinjoin/coinjoin -> llmq/chainlocks -> net_processing -> coinjoin/client"
|
||||||
"rpc/blockchain -> rpc/server -> rpc/blockchain"
|
"rpc/blockchain -> rpc/server -> rpc/blockchain"
|
||||||
|
"core_io -> evo/assetlocktx -> core_io"
|
||||||
)
|
)
|
||||||
|
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
|
Loading…
Reference in New Issue
Block a user