diff --git a/src/core_write.cpp b/src/core_write.cpp index e75cf1321..5a295a119 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -179,6 +179,8 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, int claimOp; auto stripped = StripClaimScriptPrefix(scriptPubKey, claimOp); auto extracted = ExtractDestinations(stripped, type, addresses, nRequired); + if (extracted) + out.pushKV("reqSigs", nRequired); if (claimOp >= 0) { out.pushKV("isclaim", UniValue(claimOp == OP_CLAIM_NAME || claimOp == OP_UPDATE_CLAIM)); @@ -190,7 +192,6 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, out.pushKV("type", GetTxnOutputType(type)); if (extracted || type == TX_PUBLIC) { - out.pushKV("reqSigs", nRequired); UniValue a(UniValue::VARR); for (const CTxDestination &addr : addresses) { a.push_back(EncodeDestination(addr)); diff --git a/src/test/claimtriefixture.cpp b/src/test/claimtriefixture.cpp index ec3410f94..ad9097e18 100644 --- a/src/test/claimtriefixture.cpp +++ b/src/test/claimtriefixture.cpp @@ -7,6 +7,15 @@ using namespace std; +BOOST_FIXTURE_TEST_SUITE(claimtriefixture_tests, RegTestingSetup) + +BOOST_AUTO_TEST_CASE(claimtriefixture_noop) +{ + BOOST_REQUIRE(true); +} + +BOOST_AUTO_TEST_SUITE_END() + CMutableTransaction BuildTransaction(const CTransaction& prev, uint32_t prevout, unsigned int numOutputs, int locktime) { CMutableTransaction tx;