aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/blockchain_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r--src/blockchain_db/blockchain_db.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h
index ac2c55db1..9a321437b 100644
--- a/src/blockchain_db/blockchain_db.h
+++ b/src/blockchain_db/blockchain_db.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019, The Monero Project
+// Copyright (c) 2014-2020, The Monero Project
//
// All rights reserved.
//
@@ -1040,6 +1040,16 @@ public:
virtual difficulty_type get_block_difficulty(const uint64_t& height) const = 0;
/**
+ * @brief correct blocks cumulative difficulties that were incorrectly calculated due to the 'difficulty drift' bug
+ *
+ * If the block does not exist, the subclass should throw BLOCK_DNE
+ *
+ * @param start_height the height where the drift starts
+ * @param new_cumulative_difficulties new cumulative difficulties to be stored
+ */
+ virtual void correct_block_cumulative_difficulties(const uint64_t& start_height, const std::vector<difficulty_type>& new_cumulative_difficulties) = 0;
+
+ /**
* @brief fetch a block's already generated coins
*
* The subclass should return the total coins generated as of the block