diff options
| author | langerhans <[email protected]> | 2014-12-20 17:21:29 +0100 |
|---|---|---|
| committer | langerhans <[email protected]> | 2014-12-20 17:21:29 +0100 |
| commit | e993b12278f0a0b64b03b55898cc263ae7e139d3 (patch) | |
| tree | 3094b437c6ab85bbd826cd1308d5a931a0d09533 /src | |
| parent | Merge pull request #748 from domob1812/fix-auxpow (diff) | |
| download | discoin-e993b12278f0a0b64b03b55898cc263ae7e139d3.tar.xz discoin-e993b12278f0a0b64b03b55898cc263ae7e139d3.zip | |
Add %i to -blocknotify and replace it by the height of the block that the notification is about
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 40aacc8d4..ed237a73c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,7 @@ #include <boost/filesystem/fstream.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int.hpp> +#include <boost/lexical_cast.hpp> using namespace std; using namespace boost; @@ -2318,6 +2319,7 @@ bool ActivateBestChain(CValidationState &state) { if (!IsInitialBlockDownload() && !strCmd.empty()) { boost::replace_all(strCmd, "%s", chainActive.Tip()->GetBlockHash().GetHex()); + boost::replace_all(strCmd, "%i", boost::lexical_cast<std::string>(chainActive.Height())); boost::thread t(runCommand, strCmd); // thread runs free } } |