aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_signrawtransaction.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-11-28 15:57:47 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-28 15:58:18 -0500
commit9f556622c57d3f7a0fdc8e3807fd798ee4b5a2fe (patch)
tree6d1bce64f12a47f4a301c7e63b0904a31814eadf /test/functional/rpc_signrawtransaction.py
parent5150accdd2a7c7f0edf964d56bd7d34b5f740cdc (diff)
parent542651cfb408d10e6eaaa24ad985c95e51f88f75 (diff)
downloadbitcoin-9f556622c57d3f7a0fdc8e3807fd798ee4b5a2fe.tar.xz
Merge #14328: [0.17] Backports
542651cfb4 travis: Remove deprecated sudo (MarcoFalke) ec71f06a8d build: Add bitcoin-tx.exe into Windows installer (Chun Kuan Lee) 7edebedef1 build: Remove illegal spacing in darwin.mk (Jon Layton) fb9ad043f8 Fix listreceivedbyaddress not taking address as a string (Eric Scrivner) 91fa15aaeb wallet: Avoid potential use of unitialized value bnb_used in CWallet::CreateTransaction(...) (practicalswift) 96f15e8bb3 Tests: Fix a comment (fridokus) 60f7a97930 qa: Add test to ensure node can generate all help texts at runtime (MarcoFalke) 2f9fd29321 disallow oversized CBlockHeaderAndShortTxIDs (Kaz Wesley) 5331ad0506 fix a deserialization overflow edge case (Kaz Wesley) 94065024c7 add a test demonstrating an overflow in a deserialization edge case (Kaz Wesley) 85aacc41ba Add autogen.sh in ARM Cross-compilation (Walter) bb90695551 [wallet] Ensure wallet is unlocked before signing (gustavonalle) Pull request description: Tree-SHA512: d82813134e5fc5437fe690127a4701d7ba66bf27799d7ecb1fbc2cc4dd81b6b3f708c1f314b725e8a3a6525ffa388299e277157f784f762256e01afb24822b25
Diffstat (limited to 'test/functional/rpc_signrawtransaction.py')
-rwxr-xr-xtest/functional/rpc_signrawtransaction.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/rpc_signrawtransaction.py b/test/functional/rpc_signrawtransaction.py
index 035f10e6bc..823892a349 100755
--- a/test/functional/rpc_signrawtransaction.py
+++ b/test/functional/rpc_signrawtransaction.py
@@ -49,6 +49,14 @@ class SignRawTransactionsTest(BitcoinTestFramework):
rawTxSigned2 = self.nodes[0].signrawtransaction(rawTx, inputs, privKeys)
assert_equal(rawTxSigned, rawTxSigned2)
+ def test_with_lock_outputs(self):
+ """Test correct error reporting when trying to sign a locked output"""
+ self.nodes[0].encryptwallet("password")
+ self.restart_node(0)
+ rawTx = '020000000156b958f78e3f24e0b2f4e4db1255426b0902027cb37e3ddadb52e37c3557dddb0000000000ffffffff01c0a6b929010000001600149a2ee8c77140a053f36018ac8124a6ececc1668a00000000'
+
+ assert_raises_rpc_error(-13, "Please enter the wallet passphrase with walletpassphrase first", self.nodes[0].signrawtransactionwithwallet, rawTx)
+
def script_verification_error_test(self):
"""Create and sign a raw transaction with valid (vin 0), invalid (vin 1) and one missing (vin 2) input script.
@@ -150,6 +158,7 @@ class SignRawTransactionsTest(BitcoinTestFramework):
def run_test(self):
self.successful_signing_test()
self.script_verification_error_test()
+ self.test_with_lock_outputs()
if __name__ == '__main__':