def cleanup(self):
        self.log('in cleanup')
        for p in self.block_candidates.values():
            if self.head.number >= p.height:
                self.block_candidates.pop(p.blockhash)
        for h in list(self.heights):
            if self.heights[h].height < self.head.number:
                self.heights.pop(h)
dataset/ETHPy150Open HydraChain/hydrachain/hydrachain/consensus/manager.py/ConsensusManager.cleanup/original