Revised BlockMap cleanup to remove blocks based on least-recently-used, with a minimum disuse threshold of 1 minute

#265 Declined
Repository
Branch
change_blockmap_cleanup
Repository
Branch
2.1.1-RC
Author
  1. Woodstock Merkle
Reviewers
Description

These changes implement a least-recently-used functionality, and smooth out how often and how aggressive blockmap.cleanup() is called. I will benchmark this change to see if it helps with download speed.

Comments (1)

  1. Michael Witrant

    It looks good, except for the last access update which seems quite intrusive and easily forgettable when we add new methods. What about recording that through the BlockMap accesses instead? All the code get block indexes from the BlockMap, and they should not keep the loaded references. So we could record the last access when a block index is requested.