Make it clear where BlockProcessor is instantiated

This commit is contained in:
Neil Booth 2018-07-19 13:01:07 +08:00
parent 227696636d
commit a019656a5e

View File

@ -21,7 +21,8 @@ class ChainState(object):
self.tasks = tasks
self.shutdown_event = shutdown_event
self.daemon = env.coin.DAEMON(env)
self.bp = env.coin.BLOCK_PROCESSOR(env, tasks, self.daemon)
BlockProcessor = env.coin.BLOCK_PROCESSOR
self.bp = BlockProcessor(env, tasks, self.daemon)
self.mempool = MemPool(env.coin, self, self.tasks,
self.bp.add_new_block_callback)
self.history_cache = pylru.lrucache(256)