def mine_block(self, chain: MiningChain, block_number: int, num_tx: int) -> BaseBlock: for i in range(1, num_tx + 1): self.apply_transaction(chain) return chain.mine_block()
def mine_empty_blocks(self, chain: MiningChain, number_blocks: int) -> None: for _ in range(1, number_blocks + 1): block = chain.mine_block() logging.debug(format_block(block))