aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2019-06-20 14:02:06 +1000
committerAnthony Towns <aj@erisian.com.au>2019-06-25 12:37:08 +1000
commit01174596e69568c434198a86f54cb9ea6740e6c2 (patch)
treeff3e12d9d2a1532cd280fa3b6602ac9c07434ef4 /test
parent413e438ea9767710d4810c4400fd1242ca52cd1c (diff)
signrawtransactionwithkey: report error when missing redeemScript/witnessScript param
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_createmultisig.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py
index 7abcd71bb8..18709f3f01 100755
--- a/test/functional/rpc_createmultisig.py
+++ b/test/functional/rpc_createmultisig.py
@@ -101,6 +101,11 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
outval = value - decimal.Decimal("0.00001000")
rawtx = node2.createrawtransaction([{"txid": txid, "vout": vout}], [{self.final: outval}])
+ prevtx_err = dict(prevtxs[0])
+ del prevtx_err["redeemScript"]
+
+ assert_raises_rpc_error(-8, "Missing redeemScript/witnessScript", node2.signrawtransactionwithkey, rawtx, self.priv[0:self.nsigs-1], [prevtx_err])
+
rawtx2 = node2.signrawtransactionwithkey(rawtx, self.priv[0:self.nsigs - 1], prevtxs)
rawtx3 = node2.signrawtransactionwithkey(rawtx2["hex"], [self.priv[-1]], prevtxs)