Change behavior of ExtractDestination, Solver, and GetscriptAddress for crypto conditions

This commit is contained in:
miketout
2018-10-06 00:36:21 -07:00
parent ef9a13b557
commit 68b9a352da
5 changed files with 77 additions and 31 deletions

View File

@@ -2085,6 +2085,17 @@ isminetype CWallet::IsMine(const CTransaction& tx, uint32_t voutNum)
case TX_NULL_DATA:
break;
case TX_CRYPTOCONDITION:
// for now, default is that the first value returned will be the script, subsequent values will be
// pubkeys. if we have the first pub key in our wallet, we consider this spendable
if (vSolutions.size() > 1)
{
keyID = CPubKey(vSolutions[1]).GetID();
if (this->HaveKey(keyID))
return ISMINE_SPENDABLE;
}
break;
case TX_PUBKEY:
keyID = CPubKey(vSolutions[0]).GetID();
if (this->HaveKey(keyID))