Revert GetScriptaddres

This commit is contained in:
jl777
2018-11-18 04:28:51 -11:00
parent ecc94d66c3
commit 28029a846f

View File

@@ -186,7 +186,7 @@ void CCaddr3set(struct CCcontract_info *cp,uint8_t evalcode,CPubKey pk,uint8_t *
strcpy(cp->unspendableaddr3,coinaddr);
}
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
/*bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
{
CTxDestination address;
txnouttype whichType;
@@ -199,6 +199,18 @@ bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
}
fprintf(stderr,"Solver for scriptPubKey failed\n%s\n", scriptPubKey.ToString().c_str());
return(false);
}*/
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
{
CTxDestination address; txnouttype whichType;
if ( ExtractDestination(scriptPubKey,address) != 0 )
{
strcpy(destaddr,(char *)CBitcoinAddress(address).ToString().c_str());
return(true);
}
//fprintf(stderr,"ExtractDestination failed\n");
return(false);
}
bool GetCCParams(Eval* eval, const CTransaction &tx, uint32_t nIn,