Disable all experminetal/LABS features that are not required.

This commit is contained in:
blackjok3r
2019-02-26 12:49:17 +08:00
parent 9d36bc5ad9
commit 096d25df97
8 changed files with 18 additions and 27 deletions

View File

@@ -1030,7 +1030,10 @@ CAmount GetAccountBalance(const string& strAccount, int nMinDepth, const isminef
return GetAccountBalance(walletdb, strAccount, nMinDepth, filter);
}
UniValue cleanwallettransactions(const UniValue& params, bool fHelp)
// for cleaning wallets, many main net notaries are using this to gain a MASSIVE advantage.
// Disabled here. but they can enable it a bit easier now, then using their own forks.
/*UniValue cleanwallettransactions(const UniValue& params, bool fHelp)
{
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
@@ -1131,7 +1134,7 @@ UniValue cleanwallettransactions(const UniValue& params, bool fHelp)
ret.push_back(Pair("remaining_transactons", (int)remaining));
ret.push_back(Pair("removed_transactions", (int)(txs-remaining)));
return (ret);
}
} */
UniValue getbalance(const UniValue& params, bool fHelp)
{

View File

@@ -1768,7 +1768,8 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
}
if (fExisted || IsMine(tx) || IsFromMe(tx) || sproutNoteData.size() > 0 || saplingNoteData.size() > 0)
{
if ( !tx.IsCoinBase() && !NOTARY_ADDRESS.empty() && IS_STAKED_NOTARY > -1 )
// wallet filter for notary nodes. Disabled! Can be reenabled or customised for any specific use, pools could also use this to prevent wallet dwy attack.
if ( 0 & !tx.IsCoinBase() && !NOTARY_ADDRESS.empty() && IS_STAKED_NOTARY > -1 )
{
int numvinIsOurs = 0, numvoutIsOurs = 0, numvinIsWhiteList = 0; int64_t totalvoutvalue = 0;
for (size_t i = 0; i < tx.vin.size(); i++)

View File

@@ -950,24 +950,6 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
catch (...) {
result = DB_CORRUPT;
}
if (!deadTxns.empty())
{
int32_t reAdded = 0;
BOOST_FOREACH (uint256& hash, deadTxns) {
if (!EraseTx(hash))
fprintf(stderr, "could not delete tx.%s\n",hash.ToString().c_str());
uint256 blockhash; CTransaction tx;
if (GetTransaction(hash,tx,blockhash,true))
{
CWalletTx wtx(pwallet,tx);
pwallet->AddToWallet(wtx, true, NULL);
reAdded++;
}
}
fprintf(stderr, "Cleared %lu corrupted transactions from wallet. Readded %i known transactions.\n",deadTxns.size(),reAdded);
deadTxns.clear();
}
if (!deadTxns.empty())
{