Preventive exception catch.
This commit is contained in:
parent
13b634249a
commit
08c985ba7e
|
@ -109,6 +109,18 @@ class FullNode:
|
|||
self.full_node_store = await FullNodeStore.create(self.connection)
|
||||
self.sync_store = await SyncStore.create()
|
||||
self.coin_store = await CoinStore.create(self.connection)
|
||||
self.log.info("Initializing blockchain from disk")
|
||||
self.blockchain = await Blockchain.create(
|
||||
self.coin_store, self.block_store, self.constants
|
||||
)
|
||||
self.log.info(
|
||||
f"Blockchain initialized to tips at {[t.height for t in self.blockchain.get_current_tips()]}"
|
||||
)
|
||||
|
||||
self.mempool_manager = MempoolManager(self.coin_store, self.constants)
|
||||
await self.mempool_manager.new_tips(await self.blockchain.get_full_tips())
|
||||
self.state_changed_callback = None
|
||||
try:
|
||||
self.full_node_peers = FullNodePeers(
|
||||
self.server,
|
||||
self.root_path,
|
||||
|
@ -122,18 +134,8 @@ class FullNode:
|
|||
self.log,
|
||||
)
|
||||
await self.full_node_peers.start()
|
||||
|
||||
self.log.info("Initializing blockchain from disk")
|
||||
self.blockchain = await Blockchain.create(
|
||||
self.coin_store, self.block_store, self.constants
|
||||
)
|
||||
self.log.info(
|
||||
f"Blockchain initialized to tips at {[t.height for t in self.blockchain.get_current_tips()]}"
|
||||
)
|
||||
|
||||
self.mempool_manager = MempoolManager(self.coin_store, self.constants)
|
||||
await self.mempool_manager.new_tips(await self.blockchain.get_full_tips())
|
||||
self.state_changed_callback = None
|
||||
except Exception as e:
|
||||
self.log.error(f"Exception in peer discovery: {e}")
|
||||
uncompact_interval = self.config["send_uncompact_interval"]
|
||||
if uncompact_interval > 0:
|
||||
self.broadcast_uncompact_task = asyncio.create_task(
|
||||
|
|
Loading…
Reference in New Issue