diff options
Diffstat (limited to 'tools/merge.py')
-rwxr-xr-x | tools/merge.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/merge.py b/tools/merge.py index 75e72ae..e6fae24 100755 --- a/tools/merge.py +++ b/tools/merge.py @@ -34,7 +34,7 @@ storagenodes = config["storagenodes"] paths = localconfig["paths"] mergedb = paths["mergedb"] -signingnode = config["signingnodes"][0] +signingnodes = config["signingnodes"] chainsdir = mergedb + "/chains" logorderfile = mergedb + "/logorder" @@ -238,8 +238,13 @@ tree_size = len(logorder) root_hash = tree[-1][0] timestamp = int(time.time() * 1000) -tree_head_signature = create_sth_signature(tree_size, timestamp, - root_hash, "https://%s/" % signingnode["address"], key=own_key) +for signingnode in signingnodes: + try: + tree_head_signature = create_sth_signature(tree_size, timestamp, + root_hash, "https://%s/" % signingnode["address"], key=own_key) + break + except urllib2.URLError: + pass sth = {"tree_size": tree_size, "timestamp": timestamp, "sha256_root_hash": base64.b64encode(root_hash), |