示例#1
0
 def create_block_validator(self, new_block, on_block_validated):
     return BlockValidator(consensus=TestModeVerifier(),
                           new_block=new_block,
                           chain_head=self.btm.chain_head,
                           block_cache=self.btm.block_cache,
                           done_cb=on_block_validated,
                           executor=MockTransactionExecutor(),
                           squash_handler=None)
示例#2
0
 def create_block_validator(self, new_block, on_block_validated):
     return BlockValidator(consensus_module=mock_consensus,
                           new_block=new_block,
                           chain_head=self.block_tree_manager.chain_head,
                           state_view_factory=self.state_view_factory,
                           block_cache=self.block_tree_manager.block_cache,
                           done_cb=on_block_validated,
                           executor=MockTransactionExecutor(),
                           squash_handler=None)
示例#3
0
 def create_block_validator(self, new_block, on_block_validated):
     return BlockValidator(
         consensus_module=mock_consensus,
         new_block=new_block,
         chain_head=self.block_tree_manager.chain_head,
         state_view_factory=self.state_view_factory,
         block_cache=self.block_tree_manager.block_cache,
         done_cb=on_block_validated,
         executor=MockTransactionExecutor(batch_execution_result=None),
         squash_handler=None,
         identity_signing_key=self.block_tree_manager.identity_signing_key,
         data_dir=None,
         config_dir=None)