aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-03-04 14:58:04 +0200
committerRiccardo Spagni <ric@spagni.net>2019-03-04 14:58:04 +0200
commit194c4c0bcb9f308e7e5543bd06b829eb8dea38df (patch)
tree1c8661ec9349c295b7842a5f1bfc0031eef12788 /src/cryptonote_core/blockchain.cpp
parent1b4fa00d7c21a72267968438b0a3cd8eeac50977 (diff)
parenta17da7202bcd176a0134ebdaeba6fbce40e745fc (diff)
downloadmonzero-core-194c4c0bcb9f308e7e5543bd06b829eb8dea38df.tar.gz
monzero-core-194c4c0bcb9f308e7e5543bd06b829eb8dea38df.tar.xz
monzero-core-194c4c0bcb9f308e7e5543bd06b829eb8dea38df.zip
Merge pull request #5128
a17da720 Print the reason why a notification spec failed to parse (moneromooo-monero) 356d8137 blockchain: include number of discarded blocks in --reorg-notify (moneromooo-monero) 4d598e3d core: add a few more block rate window sizes (moneromooo-monero) d4fb9641 core: add --block-rate-notify (moneromooo-monero) 28b6dbf2 notify: fix tokenizing being too strict (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 42003921a..0de4d49de 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1056,6 +1056,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<blocks_ext_by_hash::
}
// if we're to keep the disconnected blocks, add them as alternates
+ const size_t discarded_blocks = disconnected_chain.size();
if(!discard_disconnected_chain)
{
//pushing old chain as alternative chain
@@ -1083,7 +1084,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<blocks_ext_by_hash::
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);
+ "%n", std::to_string(m_db->height() - split_height).c_str(), "%d", std::to_string(discarded_blocks).c_str(), NULL);
MGINFO_GREEN("REORGANIZE SUCCESS! on height: " << split_height << ", new blockchain size: " << m_db->height());
return true;