From 2f2548d5e0ccea6879eb7b0b851d61ad2f544423 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Tue, 6 Sep 2016 00:50:23 +0800 Subject: [PATCH] Fix SIGHASH_SINGLE bug in test_framework SignatureHash The value for "other" inputs should be -1 (0xffffffffffffffff) instead of 0 --- qa/rpc-tests/test_framework/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/script.py b/qa/rpc-tests/test_framework/script.py index b46c643cc..83bbf2047 100644 --- a/qa/rpc-tests/test_framework/script.py +++ b/qa/rpc-tests/test_framework/script.py @@ -882,7 +882,7 @@ def SignatureHash(script, txTo, inIdx, hashtype): tmp = txtmp.vout[outIdx] txtmp.vout = [] for i in range(outIdx): - txtmp.vout.append(CTxOut()) + txtmp.vout.append(CTxOut(-1)) txtmp.vout.append(tmp) for i in range(len(txtmp.vin)):