Display which network the node is running on.

Co-authored-by: Jeff Liang
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
jeff-liang 2019-01-05 08:19:20 -05:00 committed by Eirik Ogilvie-Wigley
parent a85887ee1b
commit 188f3254fc
1 changed files with 10 additions and 1 deletions

View File

@ -109,6 +109,15 @@ double GetLocalSolPS()
return miningTimer.rate(solutionTargetChecks);
}
std::string WhichNetwork()
{
if (GetBoolArg("-regtest", false))
return "regtest ";
if (GetBoolArg("-testnet", false))
return "testnet ";
return "mainnet ";
}
int EstimateNetHeight(const Consensus::Params& params, int currentHeadersHeight, int64_t currentHeadersTime)
{
int64_t now = GetAdjustedTime();
@ -460,7 +469,7 @@ void ThreadShowMetricsScreen()
std::cout << std::endl;
// Thank you text
std::cout << _("Thank you for running a Zcash node!") << std::endl;
std::cout << _("Thank you for running a " + WhichNetwork() + "Zcash node!") << std::endl;
std::cout << _("You're helping to strengthen the network and contributing to a social good :)") << std::endl;
// Privacy notice text