Logging tweaks
This commit is contained in:
parent
ca3ba2b2d8
commit
8e99d076b6
@ -28,7 +28,6 @@ class ChainState(object):
|
|||||||
self.history_cache = pylru.lrucache(256)
|
self.history_cache = pylru.lrucache(256)
|
||||||
# External interface: pass-throughs for mempool.py
|
# External interface: pass-throughs for mempool.py
|
||||||
self.cached_mempool_hashes = self.daemon.cached_mempool_hashes
|
self.cached_mempool_hashes = self.daemon.cached_mempool_hashes
|
||||||
self.mempool_refresh_event = self.daemon.mempool_refresh_event
|
|
||||||
self.getrawtransactions = self.daemon.getrawtransactions
|
self.getrawtransactions = self.daemon.getrawtransactions
|
||||||
self.utxo_lookup = self.bp.db_utxo_lookup
|
self.utxo_lookup = self.bp.db_utxo_lookup
|
||||||
# External interface pass-throughs for session.py
|
# External interface pass-throughs for session.py
|
||||||
@ -112,6 +111,6 @@ class ChainState(object):
|
|||||||
# Tell the daemon to fetch the mempool going forwards, trigger
|
# Tell the daemon to fetch the mempool going forwards, trigger
|
||||||
# an initial fetch, and wait for the mempool to synchronize
|
# an initial fetch, and wait for the mempool to synchronize
|
||||||
mempool_refresh_event = asyncio.Event()
|
mempool_refresh_event = asyncio.Event()
|
||||||
daemon._mempool_refresh_event = mempool_refresh_event
|
self.daemon._mempool_refresh_event = mempool_refresh_event
|
||||||
self.tasks.create_task(self.daemon.height())
|
self.tasks.create_task(self.daemon.height())
|
||||||
await self.mempool.start_and_wait(mempool_refresh_event)
|
await self.mempool.start_and_wait(mempool_refresh_event)
|
||||||
|
|||||||
@ -37,6 +37,7 @@ class Controller(ServerBase):
|
|||||||
self.logger.info(f'aiorpcX version: {version_string(aiorpcx_version)}')
|
self.logger.info(f'aiorpcX version: {version_string(aiorpcx_version)}')
|
||||||
self.logger.info(f'supported protocol versions: {min_str}-{max_str}')
|
self.logger.info(f'supported protocol versions: {min_str}-{max_str}')
|
||||||
self.logger.info(f'event loop policy: {env.loop_policy}')
|
self.logger.info(f'event loop policy: {env.loop_policy}')
|
||||||
|
self.logger.info(f'reorg limit is {env.reorg_limit:,d} blocks')
|
||||||
|
|
||||||
self.chain_state = ChainState(env, self.tasks)
|
self.chain_state = ChainState(env, self.tasks)
|
||||||
self.peer_mgr = PeerManager(env, self.tasks, self.chain_state)
|
self.peer_mgr = PeerManager(env, self.tasks, self.chain_state)
|
||||||
|
|||||||
@ -63,7 +63,6 @@ class DB(object):
|
|||||||
self.tx_counts = None
|
self.tx_counts = None
|
||||||
|
|
||||||
self.logger.info(f'using {self.env.db_engine} for DB backend')
|
self.logger.info(f'using {self.env.db_engine} for DB backend')
|
||||||
self.logger.info(f'reorg limit is {self.env.reorg_limit:,d} blocks')
|
|
||||||
|
|
||||||
self.headers_file = util.LogicalFile('meta/headers', 2, 16000000)
|
self.headers_file = util.LogicalFile('meta/headers', 2, 16000000)
|
||||||
self.tx_counts_file = util.LogicalFile('meta/txcounts', 2, 2000000)
|
self.tx_counts_file = util.LogicalFile('meta/txcounts', 2, 2000000)
|
||||||
|
|||||||
@ -58,12 +58,12 @@ class History(object):
|
|||||||
self.comp_cursor = -1
|
self.comp_cursor = -1
|
||||||
self.db_version = max(self.DB_VERSIONS)
|
self.db_version = max(self.DB_VERSIONS)
|
||||||
|
|
||||||
self.logger.info(f'flush count: {self.flush_count:,d}')
|
|
||||||
self.logger.info(f'history DB version: {self.db_version}')
|
self.logger.info(f'history DB version: {self.db_version}')
|
||||||
if self.db_version not in self.DB_VERSIONS:
|
if self.db_version not in self.DB_VERSIONS:
|
||||||
msg = f'this software only handles DB versions {self.DB_VERSIONS}'
|
msg = f'this software only handles DB versions {self.DB_VERSIONS}'
|
||||||
self.logger.error(msg)
|
self.logger.error(msg)
|
||||||
raise RuntimeError(msg)
|
raise RuntimeError(msg)
|
||||||
|
self.logger.info(f'flush count: {self.flush_count:,d}')
|
||||||
|
|
||||||
def clear_excess(self, utxo_flush_count):
|
def clear_excess(self, utxo_flush_count):
|
||||||
# < might happen at end of compaction as both DBs cannot be
|
# < might happen at end of compaction as both DBs cannot be
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user