out.push_back(Pair("reqSigs", nRequired));
out.push_back(Pair("type", GetTxnOutputType(type)));
+ if (type == TX_PUBKEY_DROP)
+ {
+ vector<valtype> vSolutions;
+ if (!Solver(scriptPubKey, type, vSolutions))
+ {
+ out.push_back(Pair("keyVariant", HexStr(vSolutions[0])));
+ out.push_back(Pair("R", HexStr(vSolutions[1])));
+ }
+ }
+
Array a;
BOOST_FOREACH(const CTxDestination& addr, addresses)
a.push_back(CBitcoinAddress(addr).ToString());
case TX_PUBKEY_DROP:
{
CPubKey key = CPubKey(vSolutions[0]);
- if (keystore.HaveKey(key.GetID()))
+ CPubKey R = CPubKey(vSolutions[1]);
+ if (keystore.CheckOwnership(key, R))
return MINE_SPENDABLE;
- else
- {
- CPubKey R = CPubKey(vSolutions[1]);
- if (keystore.CheckOwnership(key, R))
- return MINE_SPENDABLE;
- }
}
break;
case TX_PUBKEYHASH:
if (!Solver(scriptPubKey, whichType, vSolutions))
return false;
- if (whichType == TX_PUBKEY || whichType == TX_PUBKEY_DROP)
+ if (whichType == TX_PUBKEY)
{
addressRet = CPubKey(vSolutions[0]).GetID();
return true;
vector<valtype> vSolutions;
if (!Solver(scriptPubKey, typeRet, vSolutions))
return false;
- if (typeRet == TX_NULL_DATA)
+ if (typeRet == TX_NULL_DATA || typeRet == TX_PUBKEY_DROP)
return true;
if (typeRet == TX_MULTISIG)