(self)
| 143 | ) |
| 144 | |
| 145 | def test_height_min(self): |
| 146 | assert os.path.isfile(os.path.join(self.prunedir, "blk00000.dat")), "blk00000.dat is missing, pruning too early" |
| 147 | self.log.info("Success") |
| 148 | self.log.info(f"Though we're already using more than 550MiB, current usage: {calc_usage(self.prunedir)}") |
| 149 | self.log.info("Mining 25 more blocks should cause the first block file to be pruned") |
| 150 | # Pruning doesn't run until we're allocating another chunk, 20 full blocks past the height cutoff will ensure this |
| 151 | mine_large_blocks(self.nodes[0], 25) |
| 152 | |
| 153 | # Wait for blk00000.dat to be pruned |
| 154 | self.wait_until(lambda: not os.path.isfile(os.path.join(self.prunedir, "blk00000.dat")), timeout=30) |
| 155 | |
| 156 | self.log.info("Success") |
| 157 | usage = calc_usage(self.prunedir) |
| 158 | self.log.info(f"Usage should be below target: {usage}") |
| 159 | assert_greater_than(550, usage) |
| 160 | |
| 161 | def create_chain_with_staleblocks(self): |
| 162 | # Create stale blocks in manageable sized chunks |
no test coverage detected