From 042f225860af9344568d15429aeabfdcbae0987e Mon Sep 17 00:00:00 2001 From: Dick Brouwer Date: Wed, 18 May 2016 14:10:56 -0700 Subject: [PATCH] Fixed sidechain-manipulation print bug when there are 0 confirmations --- contrib/sidechain-manipulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/sidechain-manipulation.py b/contrib/sidechain-manipulation.py index d52c396058..5d2c2c3ec7 100755 --- a/contrib/sidechain-manipulation.py +++ b/contrib/sidechain-manipulation.py @@ -246,7 +246,7 @@ def __init__(self, value): prev_script = prev_out["scriptPubKey"]["asm"].split(" ") assert(prev_script[10] == "OP_NOP3") if "confirmations" not in prev_tx or prev_tx["confirmations"] < int(prev_script[9]): - print("You must wait for at least %s confirmations to claim this output (have %d)" % (prev_script[9], prev_tx["confirmations"])) + print("You must wait for at least %s confirmations to claim this output (have %d)" % (prev_script[9], prev_tx.get("confirmations", 0))) exit(1) p2sh_res = sidechain.createmultisig(1, [args.sidechainAddress])