diff options
| author | Riccardo Spagni <ric@spagni.net> | 2019-01-28 21:35:46 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2019-01-28 21:35:46 +0200 |
| commit | 40bb66cc1eb2b8fbb129e4931af88857875f7a42 (patch) | |
| tree | 7f5cba7f154df0878cf5826370a86d0240aba9e9 /src/cryptonote_core/blockchain.cpp | |
| parent | 23c7663167d9d0000e782d3b3f1423b942347431 (diff) | |
| parent | 23813c7160fa1236cc882cae0ae40f3bee339f91 (diff) | |
| download | monzero-core-40bb66cc1eb2b8fbb129e4931af88857875f7a42.tar.gz monzero-core-40bb66cc1eb2b8fbb129e4931af88857875f7a42.tar.xz monzero-core-40bb66cc1eb2b8fbb129e4931af88857875f7a42.zip | |
Merge pull request #5053
23813c71 blockchain: add --reorg-notify (moneromooo-monero)
f6db59b0 notify: handle arbitrary tags (moneromooo-monero)
ff959216 notify: warn if the spec contains one of '"\ (moneromooo-monero)
13852678 common: set MONERO_DEFAULT_LOG_CATEGORY for notify and spawn (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
| -rw-r--r-- | src/cryptonote_core/blockchain.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 9f1e2a0c0..41357e72e 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1073,6 +1073,11 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<blocks_ext_by_hash:: m_hardfork->reorganize_from_chain_height(split_height); + std::shared_ptr<tools::Notify> reorg_notify = m_reorg_notify; + if (reorg_notify) + reorg_notify->notify("%s", std::to_string(split_height).c_str(), "%h", std::to_string(m_db->height()).c_str(), + "%n", std::to_string(m_db->height() - split_height).c_str(), NULL); + MGINFO_GREEN("REORGANIZE SUCCESS! on height: " << split_height << ", new blockchain size: " << m_db->height()); return true; } @@ -3701,7 +3706,7 @@ leave: 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()); + block_notify->notify("%s", epee::string_tools::pod_to_hex(id).c_str(), NULL); return true; } |
