Merge pull request #471 from UdjinM6/v0.12.0.x_debug_categories

V0.12.0.x composite debug categorie - dash
This commit is contained in:
evan82 2015-08-03 13:27:16 -07:00
commit 6ce96625dd
2 changed files with 10 additions and 1 deletions

View File

@ -378,7 +378,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += " " + _("If <category> is not supplied, output all debugging information.") + "\n";
strUsage += " " + _("<category> can be:\n");
strUsage += " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net,\n"; // Don't translate these and qt below
strUsage += " darksend, instantx, masternode, keepass, mnpayments, mnbudget"; // Don't translate these and qt below
strUsage += " dash (or specifically: darksend, instantx, masternode, keepass, mnpayments, mnbudget)"; // Don't translate these and qt below
if (mode == HMM_BITCOIN_QT)
strUsage += ", qt";
strUsage += ".\n";

View File

@ -223,6 +223,15 @@ bool LogAcceptCategory(const char* category)
const vector<string>& categories = mapMultiArgs["-debug"];
ptrCategory.reset(new set<string>(categories.begin(), categories.end()));
// thread_specific_ptr automatically deletes the set when the thread ends.
// "dash" is a composite category enabling all Dash-related debug output
if(ptrCategory->count(string("dash"))) {
ptrCategory->insert(string("darksend"));
ptrCategory->insert(string("instantx"));
ptrCategory->insert(string("masternode"));
ptrCategory->insert(string("keepass"));
ptrCategory->insert(string("mnpayments"));
ptrCategory->insert(string("mnbudget"));
}
}
const set<string>& setCategories = *ptrCategory.get();