mirror of
https://github.com/monero-project/monero.git
synced 2025-05-11 03:25:00 -04:00
blockchain: fix wrong hf version when popping multiple blocks
Since we keep track of the hf version in the db, we pick it up from there instead of doing the full reorg call, which is quite expensive
This commit is contained in:
parent
634d359a84
commit
5ee6f03742
3 changed files with 37 additions and 6 deletions
|
@ -149,6 +149,16 @@ namespace cryptonote
|
|||
bool reorganize_from_block_height(uint64_t height);
|
||||
bool reorganize_from_chain_height(uint64_t height);
|
||||
|
||||
/**
|
||||
* @brief called when one or more blocks are popped from the blockchain
|
||||
*
|
||||
* The current fork will be updated by looking up the db,
|
||||
* which is much cheaper than recomputing everything
|
||||
*
|
||||
* @param new_chain_height the height of the chain after popping
|
||||
*/
|
||||
void on_block_popped(uint64_t new_chain_height);
|
||||
|
||||
/**
|
||||
* @brief returns current state at the given time
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue