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

View File

@@ -343,6 +343,8 @@ int PoolBlock::deserialize(const uint8_t* data, size_t size, SideChain& sidechai
m_broadcasted = false;
m_wantBroadcast = false;
m_localTimestamp = time(nullptr);
return 0;
}