From 75f1374be2b6d052d26111acb070fae2d99914fc Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sat, 26 Nov 2016 13:05:14 +0100 Subject: Bug fixes from map. --- tools/merge_fetch.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py index 633ee67..28e775f 100755 --- a/tools/merge_fetch.py +++ b/tools/merge_fetch.py @@ -206,15 +206,14 @@ def merge_fetch_parallel(args, config, localconfig): entry = msg[2] logging.info("FETCHED from %s: %s", name, hexencode(ehash)) chainsdb.add(ehash, entry) # Commit later. - ehash_enc = hexencode(ehash) - newentry.append(ehash_enc) # Writing to logorderfile later. - logorder.append(ehash_enc) + newentry.append(ehash) # Writing to logorderfile later. + logorder.append(hexencode(ehash)) entries_in_log.add(ehash) if ehash in fetch_set: fetch_set.remove(ehash) del fetch_dict[ehash] chainsdb.commit() - for ehash_enc in newentry: + for ehash in newentry: add_to_logorder(logorderfile, ehash) fsync_logorder(logorderfile) @@ -240,7 +239,7 @@ def merge_fetch_parallel(args, config, localconfig): ehash = fetch_set.pop() nodes = fetch_dict[ehash] node = nodes.pop(0) - fetch_dict[ehash] = nodes.append(node) + fetch_dict[ehash] = nodes + [node] name, pipe, p = node logging.info("asking %s to fetch %s", name, hexencode(ehash)) pipe.send(('FETCH', ehash)) -- cgit v1.1