diff options
| author | Gavin Andresen <[email protected]> | 2014-10-07 13:11:48 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2014-10-09 10:25:30 -0400 |
| commit | e01a7939d3a3b231f68ae2f36cbc4de0cf4d4999 (patch) | |
| tree | 4abe870bb84c4667b4b901f458457cca7b620029 /src/main.cpp | |
| parent | Merge pull request #4976 (diff) | |
| download | discoin-e01a7939d3a3b231f68ae2f36cbc4de0cf4d4999.tar.xz discoin-e01a7939d3a3b231f68ae2f36cbc4de0cf4d4999.zip | |
Refactor -alertnotify code
Refactor common -alertnotify code into static CAlert::Notify method.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5d46c30a9..106c336a8 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) { |