# Could maybe merge both cases if doesn't unoptimize much.
ifKEEPING_ALL_BLOCKS_SINCE_LAST_M_HIGHER_BLOCK:
# Could maybe optimize by only keeping last `m` blocks height per level but due to Python list implementation I have doubts.
# Could maybe get rid of `blocksPerLevel` but only use `blocksHeightPerLevel` if don't apply just above optimization.
# Don't have to first fill data structures and only then check if can remove a block? It seems necessary, for instance if have in this order: 2 * m blocks at level 0, then 2 * m blocks at level 1 (even if this particular case is very unlikely), it won't return the index of the first block at level 0, as have to first ingest half of level 1 blocks and then the considered block height is higher than this middle level 1 block. While it should return the index of the first block at level 0.
axesLabels=['targets','compressed blockchain size (in blocks)','compressed blockchain score','constant difficulty compressed blockchain size (in blocks)','constant difficulty compressed blockchain score','compressed blockchain size keeping all blocks since last m higher block (in blocks)','compressed blockchain score keeping all blocks since last m higher block']