diff options
author | Linus Nordberg <linus@nordu.net> | 2016-12-01 14:16:19 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-12-01 14:16:19 +0100 |
commit | dac28bf5822d5ee1ed02f79e6f735ba3f4b448e3 (patch) | |
tree | d94a87075ac9ae239e845c1383b0fb4d3f836c06 | |
parent | 017417cc93c85035f170883722b4fff3cbbcc2fd (diff) |
Remove spurious message length checks.
No only are they spurious but even harmful, by hiding errors.
-rwxr-xr-x | tools/merge_fetch.py | 10 |
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) |