Set tiptime
This commit is contained in:
@@ -1832,11 +1832,19 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
||||
else return(0);
|
||||
}
|
||||
|
||||
int32_t komodo_acpublic()
|
||||
int32_t komodo_acpublic(uint32_t tiptime)
|
||||
{
|
||||
int32_t acpublic = ASSETCHAINS_PUBLIC;
|
||||
if ( (ASSETCHAINS_SYMBOL[0] == 0 || strcmp(ASSETCHAINS_SYMBOL,"ZEX") == 0) && tiptime >= KOMODO_SAPLING_DEADLINE )
|
||||
acpublic = 1;
|
||||
int32_t acpublic = ASSETCHAINS_PUBLIC; CBlockPtr *pindex;
|
||||
if ( acpublic == 0 )
|
||||
{
|
||||
if ( tiptime == 0 )
|
||||
{
|
||||
if ( (pindex= chainActive.LastTip()) != 0 )
|
||||
tiptime = pindex->nTime;
|
||||
}
|
||||
if ( (ASSETCHAINS_SYMBOL[0] == 0 || strcmp(ASSETCHAINS_SYMBOL,"ZEX") == 0) && tiptime >= KOMODO_SAPLING_DEADLINE )
|
||||
acpublic = 1;
|
||||
}
|
||||
return(acpublic);
|
||||
}
|
||||
|
||||
|
||||
@@ -1259,12 +1259,12 @@ int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||
return(0);
|
||||
}
|
||||
|
||||
int32_t komodo_acpublic();
|
||||
int32_t komodo_acpublic(uint32_t tiptime);
|
||||
|
||||
bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransaction& tx, CValidationState &state)
|
||||
{
|
||||
// Basic checks that don't depend on any context
|
||||
int32_t invalid_private_taddr=0,z_z=0,z_t=0,t_z=0,acpublic = komodo_acpublic();
|
||||
int32_t invalid_private_taddr=0,z_z=0,z_t=0,t_z=0,acpublic = komodo_acpublic(tiptime);
|
||||
/**
|
||||
* Previously:
|
||||
* 1. The consensus rule below was:
|
||||
|
||||
@@ -2342,7 +2342,7 @@ UniValue walletlock(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
}
|
||||
|
||||
int32_t komodo_acpublic();
|
||||
int32_t komodo_acpublic(uint32_t tiptime);
|
||||
|
||||
UniValue encryptwallet(const UniValue& params, bool fHelp)
|
||||
{
|
||||
@@ -2350,7 +2350,7 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
|
||||
string enableArg = "developerencryptwallet";
|
||||
flag = (komodo_acpublic() || ASSETCHAINS_SYMBOL[0] == 0);
|
||||
flag = (komodo_acpublic(0) || ASSETCHAINS_SYMBOL[0] == 0);
|
||||
auto fEnableWalletEncryption = fExperimentalMode && GetBoolArg("-" + enableArg, flag);
|
||||
|
||||
std::string strWalletEncryptionDisabledMsg = "";
|
||||
|
||||
Reference in New Issue
Block a user