func:`~~ eth.chains.base.MiningChain.mine_block是Py_EVM的挖矿函数
def mine_block(self, *args: Any, **kwargs: Any) -> BaseBlock:
"""
Mines the current block. Proxies to the current Virtual Machine.
See VM. :meth:`~eth.vm.base.VM.mine_block`
"""
mined_block = self.get_vm(self.header).mine_block(*args, **kwargs)
self.validate_block(mined_block)
self.chaindb.persist_block(mined_block)
self.header = self.ensure_header()
return mined_block
mine_block(self, *args, **kwargs):func:`~~ vm.base.VM.mine_block`
def mine_block(self, *args: Any, **kwargs: Any) -> BaseBlock:
"""
Mines the current block. Proxies to the current Virtual Machine.
See VM. :meth:`~eth.vm.base.VM.mine_block`
"""
mined_block = self.get_vm(self.header).mine_block(*args, **kwargs)
self.validate_block(mined_block)
self.chaindb.persist_block(mined_block)
self.header = self.ensure_header()
return mined_block