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.h | |
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.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 50ceccd0f..ab66fac8b 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -55,6 +55,8 @@ #include "cryptonote_basic/hardfork.h" #include "blockchain_db/blockchain_db.h" +namespace tools { class Notify; } + namespace cryptonote { class tx_memory_pool; @@ -706,6 +708,13 @@ namespace cryptonote blockchain_db_sync_mode sync_mode, bool fast_sync); /** + * @brief sets a block notify object to call for every new block + * + * @param notify the notify object to cal at every new block + */ + void set_block_notify(const std::shared_ptr<tools::Notify> ¬ify) { m_block_notify = notify; } + + /** * @brief Put DB in safe sync mode */ void safesyncmode(const bool onoff); @@ -1032,6 +1041,8 @@ namespace cryptonote uint64_t m_btc_expected_reward; bool m_btc_valid; + std::shared_ptr<tools::Notify> m_block_notify; + /** * @brief collects the keys for all outputs being "spent" as an input * |