diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-29 22:18:08 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-29 22:20:44 +0200 |
commit | 83d8f03c2338e865ce72f4e2d46d43a48530ab10 (patch) | |
tree | f828dcec6b4bf1c7fb2cbf88d8ac8e4168697643 /src/cryptonote_core/blockchain.cpp | |
parent | Merge pull request #4461 (diff) | |
download | monero-83d8f03c2338e865ce72f4e2d46d43a48530ab10.tar.xz |
Merge pull request #4333
73403004 add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc} (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 0e175cdbe..fb4dcef7c 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -52,6 +52,7 @@ #include "cryptonote_core.h" #include "ringct/rctSigs.h" #include "common/perf_timer.h" +#include "common/notify.h" #if defined(PER_BLOCK_CHECKPOINT) #include "blocks/blocks.h" #endif @@ -3552,6 +3553,10 @@ leave: get_difficulty_for_next_block(); // just to cache it invalidate_block_template_cache(); + std::shared_ptr<tools::Notify> block_notify = m_block_notify; + if (block_notify) + block_notify->notify(epee::string_tools::pod_to_hex(id).c_str()); + return true; } //------------------------------------------------------------------ |