From b668629143270f9a33ac5cbd4f777be30fd0779e Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Tue, 11 Aug 2015 19:27:05 +0000 Subject: Add block height to block notification substitution options --- src/init.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/init.cpp') 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 #include #include +#include #include #include @@ -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(chainActive.Height())); boost::thread t(runCommand, strCmd); // thread runs free } -- cgit v1.2.3