Skip to content

Commit

Permalink
Merge pull request #9 from ElementsProject/blocklog
Browse files Browse the repository at this point in the history
Be more verbose in blocksign to indicate which funcs are working
  • Loading branch information
Matt Corallo committed Jun 9, 2015
2 parents 704d415 + 32d692e commit 02c872c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/fedpeg/blocksign.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def recv_master_msg(self, msg):
def round_done(self, peer_messages):
mysig = sidechain.signblock(self.round_local_block_hex)
peer_messages.append(("self", mysig))
sys.stdout.write("Got signatures from %s, now combining..." % str([x[0] for x in peer_messages]))
sys.stdout.write("Got signatures from %s, now combining..." % str([x[0] for x in peer_messages if x[1][0] == "0" and x[1][1] == "0" and len(x[1]) == 132]))
sys.stdout.flush()
res = sidechain.combineblocksigs(self.round_local_block_hex, [x[1] for x in peer_messages])
if res["complete"]:
Expand All @@ -44,6 +44,9 @@ def round_done(self, peer_messages):
print("done")
else:
print("got incomplete block")
for x in peer_messages:
if x[1][2:] not in res["hex"]:
print("Signature from %s was probably useless" % x[0])

def round_failed(self):
self.round_local_block_hex = ""
Expand Down

0 comments on commit 02c872c

Please sign in to comment.