Skip to content

Commit

Permalink
Tweak mempool code
Browse files Browse the repository at this point in the history
Precede 2 private functions with _.  Removed unused arg.
  • Loading branch information
Neil Booth committed Nov 27, 2017
1 parent 80caa1c commit c764d1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def prioritize(self, tx_hash):
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
Expand Down Expand Up @@ -90,7 +90,7 @@ async def main_loop(self):
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. '
Expand Down Expand Up @@ -122,7 +122,7 @@ async def main_loop(self):
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:
Expand All @@ -139,7 +139,7 @@ async def main_loop(self):
self.stop = True
break

def async_process_some(self, unfetched, limit):
def _async_process_some(self, limit):
pending = []
txs = self.txs

Expand Down

0 comments on commit c764d1d

Please sign in to comment.