Remove more CC stuff
This commit is contained in:
@@ -183,40 +183,6 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
|
||||
return true;
|
||||
}
|
||||
|
||||
if (IsCryptoConditionsEnabled()) {
|
||||
// Shortcut for pay-to-crypto-condition
|
||||
CScript ccSubScript = CScript();
|
||||
std::vector<std::vector<unsigned char>> vParams;
|
||||
if (scriptPubKey.IsPayToCryptoCondition(&ccSubScript, vParams))
|
||||
{
|
||||
if (scriptPubKey.MayAcceptCryptoCondition())
|
||||
{
|
||||
typeRet = TX_CRYPTOCONDITION;
|
||||
vector<unsigned char> hashBytes; uint160 x; int32_t i; uint8_t hash20[20],*ptr;;
|
||||
x = Hash160(ccSubScript);
|
||||
memcpy(hash20,&x,20);
|
||||
hashBytes.resize(20);
|
||||
ptr = hashBytes.data();
|
||||
for (i=0; i<20; i++)
|
||||
ptr[i] = hash20[i];
|
||||
vSolutionsRet.push_back(hashBytes);
|
||||
if (vParams.size())
|
||||
{
|
||||
COptCCParams cp = COptCCParams(vParams[0]);
|
||||
if (cp.IsValid())
|
||||
{
|
||||
for (auto k : cp.vKeys)
|
||||
{
|
||||
vSolutionsRet.push_back(std::vector<unsigned char>(k.begin(), k.end()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Scan templates
|
||||
const CScript& script1 = scriptPubKey;
|
||||
BOOST_FOREACH(const PAIRTYPE(txnouttype, CScript)& tplate, mTemplates)
|
||||
@@ -404,21 +370,6 @@ bool ExtractDestination(const CScript& _scriptPubKey, CTxDestination& addressRet
|
||||
addressRet = CScriptID(uint160(vSolutions[0]));
|
||||
return true;
|
||||
}
|
||||
|
||||
else if (IsCryptoConditionsEnabled() != 0 && whichType == TX_CRYPTOCONDITION)
|
||||
{
|
||||
if (vSolutions.size() > 1)
|
||||
{
|
||||
CPubKey pk = CPubKey((vSolutions[1]));
|
||||
addressRet = pk;
|
||||
return pk.IsValid();
|
||||
}
|
||||
else
|
||||
{
|
||||
addressRet = CKeyID(uint160(vSolutions[0]));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Multisig txns have more than one address...
|
||||
return false;
|
||||
}
|
||||
@@ -464,30 +415,7 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto
|
||||
|
||||
if (addressRet.empty())
|
||||
return false;
|
||||
}
|
||||
// Removed to get CC address printed in getrawtransaction and decoderawtransaction
|
||||
// else if (IsCryptoConditionsEnabled() != 0 && typeRet == TX_CRYPTOCONDITION)
|
||||
// {
|
||||
// nRequiredRet = vSolutions.front()[0];
|
||||
// for (unsigned int i = 1; i < vSolutions.size()-1; i++)
|
||||
// {
|
||||
// CTxDestination address;
|
||||
// if (vSolutions[i].size() == 20)
|
||||
// {
|
||||
// address = CKeyID(uint160(vSolutions[i]));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// address = CPubKey(vSolutions[i]);
|
||||
// }
|
||||
// addressRet.push_back(address);
|
||||
// }
|
||||
|
||||
// if (addressRet.empty())
|
||||
// return false;
|
||||
// }
|
||||
else
|
||||
{
|
||||
} else {
|
||||
nRequiredRet = 1;
|
||||
CTxDestination address;
|
||||
if (!ExtractDestination(scriptPubKey, address))
|
||||
|
||||
Reference in New Issue
Block a user