aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp7
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;
}