Tweak mempool code
Precede 2 private functions with _. Removed unused arg.
This commit is contained in:
parent
80caa1c4ea
commit
c764d1de18
@ -49,7 +49,7 @@ class MemPool(util.LoggedClass):
|
||||
initial mempool sync.'''
|
||||
self.prioritized.add(tx_hash)
|
||||
|
||||
def resync_daemon_hashes(self, unprocessed, unfetched):
|
||||
def _resync_daemon_hashes(self, unprocessed, unfetched):
|
||||
'''Re-sync self.txs with the list of hashes in the daemon's mempool.
|
||||
|
||||
Additionally, remove gone hashes from unprocessed and
|
||||
@ -90,7 +90,7 @@ class MemPool(util.LoggedClass):
|
||||
unfetched = set()
|
||||
txs = self.txs
|
||||
fetch_size = 800
|
||||
process_some = self.async_process_some(unfetched, fetch_size // 2)
|
||||
process_some = self._async_process_some(fetch_size // 2)
|
||||
|
||||
await self.daemon.mempool_refresh_event.wait()
|
||||
self.logger.info('beginning processing of daemon mempool. '
|
||||
@ -122,7 +122,7 @@ class MemPool(util.LoggedClass):
|
||||
self.prioritized.clear()
|
||||
await self.daemon.mempool_refresh_event.wait()
|
||||
|
||||
self.resync_daemon_hashes(unprocessed, unfetched)
|
||||
self._resync_daemon_hashes(unprocessed, unfetched)
|
||||
self.daemon.mempool_refresh_event.clear()
|
||||
|
||||
if unfetched:
|
||||
@ -139,7 +139,7 @@ class MemPool(util.LoggedClass):
|
||||
self.stop = True
|
||||
break
|
||||
|
||||
def async_process_some(self, unfetched, limit):
|
||||
def _async_process_some(self, limit):
|
||||
pending = []
|
||||
txs = self.txs
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user