summaryrefslogtreecommitdiff
path: root/tools/merge_dist.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/merge_dist.py')
-rwxr-xr-xtools/merge_dist.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/merge_dist.py b/tools/merge_dist.py
index 0e85984..20b6a06 100755
--- a/tools/merge_dist.py
+++ b/tools/merge_dist.py
@@ -13,12 +13,11 @@ from certtools import timing_point, \
from mergetools import get_curpos, get_logorder, chunks, get_missingentries, \
sendsth, sendlog, sendentry, read_chain, parse_args
-def merge_dist(args, config, localconfig, timestamp):
+def merge_dist(args, localconfig, frontendnodes, timestamp):
paths = localconfig["paths"]
own_key = (localconfig["nodename"],
"%s/%s-private.pem" % (paths["privatekeys"],
localconfig["nodename"]))
- frontendnodes = config["frontendnodes"]
mergedb = paths["mergedb"]
chainsdir = mergedb + "/chains"
logorderfile = mergedb + "/logorder"
@@ -125,8 +124,14 @@ def main():
"""
args, config, localconfig = parse_args()
timestamp = 0
+
+ if len(args.node) == 0:
+ nodes = config["frontendnodes"]
+ else:
+ nodes = [n for n in config["frontendnodes"] if n["name"] in args.node]
+
while True:
- timestamp = merge_dist(args, config, localconfig, timestamp)
+ timestamp = merge_dist(args, localconfig, nodes, timestamp)
if args.interval is None:
break
print >>sys.stderr, "sleeping", args.interval, "seconds"