feat: add mempool synchronization background task to P2P network service
- Added mempool_sync_loop background task initialization in start() method - Registered mempool task in _background_tasks list for lifecycle management - Enables automatic mempool synchronization across P2P mesh network
This commit is contained in:
@@ -60,6 +60,10 @@ class P2PNetworkService:
|
||||
# Start background task to broadcast pings to active peers
|
||||
ping_task = asyncio.create_task(self._ping_peers_loop())
|
||||
self._background_tasks.append(ping_task)
|
||||
|
||||
# Start background task to sync mempool
|
||||
mempool_task = asyncio.create_task(self._mempool_sync_loop())
|
||||
self._background_tasks.append(mempool_task)
|
||||
|
||||
try:
|
||||
await self._stop_event.wait()
|
||||
|
||||
Reference in New Issue
Block a user