Enable z_mergetoaddress
This commit is contained in:
@@ -1832,6 +1832,14 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
||||
else return(0);
|
||||
}
|
||||
|
||||
int32_t komodo_acpublic()
|
||||
{
|
||||
int32_t acpublic = ASSETCHAINS_PUBLIC;
|
||||
if ( (ASSETCHAINS_SYMBOL[0] == 0 || strcmp(ASSETCHAINS_SYMBOL,"ZEX") == 0) && tiptime >= KOMODO_SAPLING_DEADLINE )
|
||||
acpublic = 1;
|
||||
return(acpublic);
|
||||
}
|
||||
|
||||
int64_t komodo_newcoins(int64_t *zfundsp,int32_t nHeight,CBlock *pblock)
|
||||
{
|
||||
CTxDestination address; int32_t i,j,m,n,vout; uint8_t *script; uint256 txid,hashBlock; int64_t zfunds=0,vinsum=0,voutsum=0;
|
||||
|
||||
@@ -1259,10 +1259,12 @@ int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||
return(0);
|
||||
}
|
||||
|
||||
int32_t komodo_acpublic();
|
||||
|
||||
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 = ASSETCHAINS_PUBLIC;
|
||||
int32_t invalid_private_taddr=0,z_z=0,z_t=0,t_z=0,acpublic = komodo_acpublic();
|
||||
/**
|
||||
* Previously:
|
||||
* 1. The consensus rule below was:
|
||||
@@ -1365,8 +1367,6 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio
|
||||
return state.DoS(100, error("CheckTransaction(): tx.valueBalance has no sources or sinks"),
|
||||
REJECT_INVALID, "bad-txns-valuebalance-nonzero");
|
||||
}
|
||||
if ( (ASSETCHAINS_SYMBOL[0] == 0 || strcmp(ASSETCHAINS_SYMBOL,"ZEX") == 0) && tiptime >= KOMODO_SAPLING_DEADLINE )
|
||||
acpublic = 1;
|
||||
if ( acpublic != 0 && (tx.vShieldedSpend.empty() == 0 || tx.vShieldedOutput.empty() == 0) )
|
||||
{
|
||||
return state.DoS(100, error("CheckTransaction(): this is a public chain, no sapling allowed"),
|
||||
|
||||
@@ -42,7 +42,7 @@ UniValue z_getpaymentdisclosure(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
|
||||
string enableArg = "paymentdisclosure";
|
||||
auto fEnablePaymentDisclosure = fExperimentalMode && GetBoolArg("-" + enableArg, false);
|
||||
auto fEnablePaymentDisclosure = fExperimentalMode && GetBoolArg("-" + enableArg, true);
|
||||
string strPaymentDisclosureDisabledMsg = "";
|
||||
if (!fEnablePaymentDisclosure) {
|
||||
strPaymentDisclosureDisabledMsg = experimentalDisabledHelpMsg("z_getpaymentdisclosure", enableArg);
|
||||
@@ -149,7 +149,7 @@ UniValue z_validatepaymentdisclosure(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
|
||||
string enableArg = "paymentdisclosure";
|
||||
auto fEnablePaymentDisclosure = fExperimentalMode && GetBoolArg("-" + enableArg, false);
|
||||
auto fEnablePaymentDisclosure = fExperimentalMode && GetBoolArg("-" + enableArg, true);
|
||||
string strPaymentDisclosureDisabledMsg = "";
|
||||
if (!fEnablePaymentDisclosure) {
|
||||
strPaymentDisclosureDisabledMsg = experimentalDisabledHelpMsg("z_validatepaymentdisclosure", enableArg);
|
||||
|
||||
@@ -2342,6 +2342,7 @@ UniValue walletlock(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
}
|
||||
|
||||
int32_t komodo_acpublic();
|
||||
|
||||
UniValue encryptwallet(const UniValue& params, bool fHelp)
|
||||
{
|
||||
@@ -2349,7 +2350,8 @@ UniValue encryptwallet(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
|
||||
string enableArg = "developerencryptwallet";
|
||||
auto fEnableWalletEncryption = fExperimentalMode && GetBoolArg("-" + enableArg, false);
|
||||
flag = (komodo_acpublic() || ASSETCHAINS_SYMBOL[0] == 0);
|
||||
auto fEnableWalletEncryption = fExperimentalMode && GetBoolArg("-" + enableArg, flag);
|
||||
|
||||
std::string strWalletEncryptionDisabledMsg = "";
|
||||
if (!fEnableWalletEncryption) {
|
||||
@@ -4528,7 +4530,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp)
|
||||
return NullUniValue;
|
||||
|
||||
string enableArg = "zmergetoaddress";
|
||||
auto fEnableMergeToAddress = fExperimentalMode && GetBoolArg("-" + enableArg, false);
|
||||
auto fEnableMergeToAddress = fExperimentalMode && GetBoolArg("-" + enableArg, true);
|
||||
std::string strDisabledMsg = "";
|
||||
if (!fEnableMergeToAddress) {
|
||||
strDisabledMsg = experimentalDisabledHelpMsg("z_mergetoaddress", enableArg);
|
||||
|
||||
Reference in New Issue
Block a user