Revert Getscriptaddress and set COINBASE_MATURITY to 1 on chains with less than one era

This commit is contained in:
miketout
2018-11-18 08:20:34 -08:00
parent b3b44e80e1
commit 3e5a1aba52
3 changed files with 6 additions and 7 deletions

View File

@@ -188,16 +188,13 @@ void CCaddr3set(struct CCcontract_info *cp,uint8_t evalcode,CPubKey pk,uint8_t *
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey)
{
CTxDestination address;
txnouttype whichType;
std::vector<std::vector<unsigned char>> vvch = std::vector<std::vector<unsigned char>>();
if (Solver(scriptPubKey, whichType, vvch) && vvch[0].size() == 20)
CTxDestination address; txnouttype whichType;
if ( ExtractDestination(scriptPubKey,address) != 0 )
{
address = CKeyID(uint160(vvch[0]));
strcpy(destaddr,(char *)CBitcoinAddress(address).ToString().c_str());
return(true);
}
fprintf(stderr,"Solver for scriptPubKey failed\n%s\n", scriptPubKey.ToString().c_str());
//fprintf(stderr,"ExtractDestination failed\n");
return(false);
}