aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
diff options
context:
space:
mode:
authorJason Wong <jason.hcwong@gmail.com>2018-11-25 22:08:07 +0100
committerJason Wong <jason.hcwong@gmail.com>2018-11-28 12:20:28 +0100
commitdc1c12528d5cf86759993614e1fdd7d7bf04ff15 (patch)
tree8fa2119970bd01b384481d2944b1dc137f271435 /src/cryptonote_core/blockchain.h
parentMerge pull request #4821 (diff)
downloadmonero-dc1c12528d5cf86759993614e1fdd7d7bf04ff15.tar.xz
add command pop_blocks
add new public method to Blockchain and update according to code review update after review: better lock/unlock, try catch and coding style
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r--src/cryptonote_core/blockchain.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index dfe833fb4..f1e366c9e 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -967,6 +967,13 @@ namespace cryptonote
*/
std::vector<time_t> get_last_block_timestamps(unsigned int blocks) const;
+ /**
+ * @brief removes blocks from the top of the blockchain
+ *
+ * @param nblocks number of blocks to be removed
+ */
+ void pop_blocks(uint64_t nblocks);
+
private:
// TODO: evaluate whether or not each of these typedefs are left over from blockchain_storage