Fixed pruning logic

- Erase an element from m_blocksByHeight only if it's empty
- Remove blocks from unconnected alternative chains too when they get old enough (4xPPLNS window)
This commit is contained in:
SChernykh
2021-08-24 18:34:28 +02:00
parent d4388bf9c0
commit e4be4c1a66
4 changed files with 38 additions and 17 deletions
+2
View File
@@ -131,6 +131,8 @@ struct PoolBlock
bool m_broadcasted;
bool m_wantBroadcast;
time_t m_localTimestamp;
void serialize_mainchain_data(uint32_t nonce, uint32_t extra_nonce, const hash& sidechain_hash);
void serialize_sidechain_data();