Test
This commit is contained in:
@@ -230,15 +230,13 @@ bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
|
|||||||
for (i=0; i<scriptPubKey.size(); i++)
|
for (i=0; i<scriptPubKey.size(); i++)
|
||||||
fprintf(stderr,"%02x",ptr[i]);
|
fprintf(stderr,"%02x",ptr[i]);
|
||||||
fprintf(stderr," scriptPubKey\n");
|
fprintf(stderr," scriptPubKey\n");
|
||||||
if ( IsStandard(scriptPubKey,whichType) != 0 )
|
if ( ExtractDestination(scriptPubKey,address) != 0 )
|
||||||
{
|
{
|
||||||
if ( ExtractDestination(scriptPubKey,address) != 0 )
|
strcpy(destaddr,(char *)CBitcoinAddress(address).ToString().c_str());
|
||||||
{
|
fprintf("destaddr.(%s)\n",destaddr);
|
||||||
strcpy(destaddr,(char *)CBitcoinAddress(address).ToString().c_str());
|
return(true);
|
||||||
return(true);
|
}
|
||||||
}
|
fprintf(stderr,"ExtractDestination failed\n");
|
||||||
fprintf(stderr,"ExtractDestination failed\n");
|
|
||||||
} else fprintf(stderr,"Getscriptaddress nonstandard\n");
|
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
|
|||||||
|
|
||||||
else if (IsCryptoConditionsEnabled() != 0 && whichType == TX_CRYPTOCONDITION)
|
else if (IsCryptoConditionsEnabled() != 0 && whichType == TX_CRYPTOCONDITION)
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,"found CC type\n");
|
||||||
addressRet = CScriptID(uint160(vSolutions[0]));
|
addressRet = CScriptID(uint160(vSolutions[0]));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user