Merge pull request #4333

73403004 add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc} (moneromooo-monero)
This commit is contained in:
Riccardo Spagni
2018-09-29 22:18:08 +02:00
parent 4a2664f743
commit 83d8f03c23
10 changed files with 300 additions and 0 deletions

View File

@@ -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;
}
//------------------------------------------------------------------