summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/merge_fetch.py9
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))