aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-10-07 13:11:48 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-10-09 10:25:30 -0400
commite01a7939d3a3b231f68ae2f36cbc4de0cf4d4999 (patch)
tree4abe870bb84c4667b4b901f458457cca7b620029 /src/main.cpp
parent7c6cbff0e52d4b69fd823426341a4d62d29b2c16 (diff)
Refactor -alertnotify code
Refactor common -alertnotify code into static CAlert::Notify method.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5d46c30a9b..106c336a83 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1178,14 +1178,9 @@ void CheckForkWarningConditions()
{
if (!fLargeWorkForkFound)
{
- std::string strCmd = GetArg("-alertnotify", "");
- if (!strCmd.empty())
- {
- std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
- pindexBestForkBase->phashBlock->ToString() + std::string("'");
- boost::replace_all(strCmd, "%s", warning);
- boost::thread t(runCommand, strCmd); // thread runs free
- }
+ std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
+ pindexBestForkBase->phashBlock->ToString() + std::string("'");
+ CAlert::Notify(warning, true);
}
if (pindexBestForkTip)
{