diff options
author | Linus Nordberg <linus@nordu.net> | 2016-11-26 13:05:14 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-11-26 13:05:14 +0100 |
commit | 75f1374be2b6d052d26111acb070fae2d99914fc (patch) | |
tree | 16d5db209db010b620d8924cb0f899cbf6764582 /tools/merge_fetch.py | |
parent | a3b424a4799851d02298e226e5a582fa1f4e8aad (diff) |
Bug fixes from map.
Diffstat (limited to 'tools/merge_fetch.py')
-rwxr-xr-x | tools/merge_fetch.py | 9 |
1 files 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)) |