diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index 658bed256..c0a6aa0ae 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -46,6 +46,7 @@ void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fInclud out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end()))); if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) { + fprintf(stderr,"extractdestinations error\n"); out.push_back(Pair("type", GetTxnOutputType(type))); return; } diff --git a/src/script/standard.cpp b/src/script/standard.cpp index 46fa27038..db1a250dc 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -31,6 +31,8 @@ const char* GetTxnOutputType(txnouttype t) case TX_SCRIPTHASH: return "scripthash"; case TX_MULTISIG: return "multisig"; case TX_NULL_DATA: return "nulldata"; + case TX_CRYPTOCONDITION: return "cryptocondition"; + default: return "invalid"; } return NULL; } @@ -260,7 +262,7 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) return true; } - else if ( whichType == TX_CRYPTOCONDITION) + else if (IsCryptoConditionsEnabled() != 0 && whichType == TX_CRYPTOCONDITION) { fprintf(stderr,"found CC type\n"); addressRet = CScriptID(uint160(vSolutions[0])); @@ -303,7 +305,10 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto nRequiredRet = 1; CTxDestination address; if (!ExtractDestination(scriptPubKey, address)) + { + fprintf(stderr,"error extractdestination from extractdestinations\n"); return false; + } addressRet.push_back(address); }