Fix unit tests after recent breaks.

This commit is contained in:
lbrynaut 2019-09-17 07:54:26 -05:00 committed by Brannon King
parent b7cdd9f2a0
commit 4df4136c5d
2 changed files with 11 additions and 1 deletions

View file

@ -180,6 +180,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));
@ -191,7 +193,6 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey,
out.pushKV("type", GetTxnOutputType(type));
if (extracted) {
out.pushKV("reqSigs", nRequired);
UniValue a(UniValue::VARR);
for (const CTxDestination &addr : addresses) {
a.push_back(EncodeDestination(addr));

View file

@ -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;