summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/merge_fetch.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py
index d6c8cb3..5fdb7d0 100755
--- a/tools/merge_fetch.py
+++ b/tools/merge_fetch.py
@@ -120,11 +120,7 @@ def merge_fetch_worker(args, localconfig, storagenode, pipe):
while True:
## Read all messages from parent.
while pipe.poll():
- msg = pipe.recv()
- if len(msg) < 2:
- continue
- cmd = msg[0]
- ehash = msg[1]
+ cmd, ehash = pipe.recv()
if cmd == 'FETCH':
to_fetch.add(ehash)
@@ -205,8 +201,6 @@ def merge_fetch_parallel(args, config, localconfig):
logging.info("polling %s", name)
while pipe.poll():
msg = pipe.recv()
- if len(msg) < 2:
- continue
cmd = msg[0]
ehash = msg[1]
if cmd == 'NEWENTRY':
@@ -214,8 +208,6 @@ def merge_fetch_parallel(args, config, localconfig):
if not ehash in fetch_dict: # Don't fetch twice.
fetch_set.add(ehash)
elif cmd == 'FETCHED':
- if len(msg) != 3:
- continue
entry = msg[2]
logging.info("FETCHED from %s: %s", name, hexencode(ehash))
chainsdb.add(ehash, entry)