diff options
| author | Ross Nicoll <[email protected]> | 2015-08-11 19:27:05 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2015-08-11 19:27:05 +0000 |
| commit | b668629143270f9a33ac5cbd4f777be30fd0779e (patch) | |
| tree | 2171a4359fbe42eecb7608044591d5acc643d85c /src/init.cpp | |
| parent | Merge pull request #1233 from patricklodder/1.10-travis-osx-sdk (diff) | |
| download | discoin-b668629143270f9a33ac5cbd4f777be30fd0779e.tar.xz discoin-b668629143270f9a33ac5cbd4f777be30fd0779e.zip | |
Add block height to block notification substitution options
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index c3a326841..94a08ee8b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -44,6 +44,7 @@ #include <boost/filesystem.hpp> #include <boost/function.hpp> #include <boost/interprocess/sync/file_lock.hpp> +#include <boost/lexical_cast.hpp> #include <boost/thread.hpp> #include <openssl/crypto.h> @@ -452,11 +453,12 @@ std::string LicenseInfo() "\n"; } -static void BlockNotifyCallback(const uint256& hashNewTip) +static void BlockNotifyCallback(const uint256& hashNewTip, const int nHeight) { std::string strCmd = GetArg("-blocknotify", ""); boost::replace_all(strCmd, "%s", hashNewTip.GetHex()); + boost::replace_all(strCmd, "%i", boost::lexical_cast<std::string>(chainActive.Height())); boost::thread t(runCommand, strCmd); // thread runs free } |