aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_signrawtransaction.py
AgeCommit message (Collapse)Author
2022-05-30MOVEONLY: Move signrawtransactionwithwallet testDaniela Brozzoni
Put signrawtransactionwithwallet_tests in rpc_signrawtransaction.py, as the test is mainly testing the signrawtransaction RPC. Review with `git show --color-moved=dimmed-zebra`
2022-01-15rpc: move softfork info from getblockchaininfo to getdeploymentinfoAnthony Towns
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-11-10scripted-diff: Remove redundant sync_all and sync_blocksMarcoFalke
The sync calls are redundant after a call to generate, because generate already syncs itself. -BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's/(generate[^\n]*\)[^\n]*)(\n|\s)+self.sync_(all|blocks)\([^\)]*\)\n/\1\n/g' $(git grep -l generate ./test) -END VERIFY SCRIPT-
2021-09-29test: introduce script_util helper for creating P2PK scriptsSebastian Falbesoner
2021-09-16test: Activate all regtest softforks at height 1, unless overriddenMarcoFalke
2021-09-02scripted-diff: Use generate* from TestFrameworkMarcoFalke
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i \ 's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \ $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf') -END VERIFY SCRIPT-
2021-08-26Set regtest.BIP65Height = 111 to speed up testsMarcoFalke
2021-08-19Use generate* from TestFrameworkMarcoFalke
The changes in feature_rbf can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2021-08-01test: refactor: remove `hex_str_to_bytes` helperSebastian Falbesoner
Use the built-in class method bytes.fromhex() instead, which is available since Python 3.0.
2021-07-27test: use constants for CSV/CLTV activation heights in rpc_signrawtransactionSebastian Falbesoner
2021-07-27test: introduce `generate_to_height` helper, use in rpc_signrawtransactionSebastian Falbesoner
This will speed up the test a bit and avoid potential .generate() RPC timeouts (in sub-test `test_signing_with_cltv()`) on slower machines.
2021-07-25test: check that CSV/CLTV are active in rpc_signrawtransactionSebastian Falbesoner
Without this check, the tests would also pass if the CSV and CLTV activation heights are not reached yet (e.g. if the .generate() calls before are removed), as the operations OP_CSV and OP_CLTV simply behave as NOPs. Also fixes a comment in the sub-test `test_signing_with_cltv()`.
2021-07-05test: use script_util helpers for creating P2W{PKH,SH} scriptsSebastian Falbesoner
2021-06-21test: introduce `tx_from_hex` helper for tx deserializationSebastian Falbesoner
`FromHex` is mostly used for transactions, so we introduce a shortcut `tx_from_hex` for `FromHex(CTransaction, hex_str)`.
2021-05-31Use COINBASE_MATURITY constant in functional tests.Kiminuo
2021-03-04Test that signrawtx works when a signed CSV and CLTV inputs are presentAndrew Chow
2020-12-03tests: Test that a fully signed tx given to signrawtx is unchangedAndrew Chow
Tests that a fully signed transaction given to signrawtransactionwithwallet is both unchanged and marked as complete. This tests for a regression in 0.20 where the transaction would not be marked as complete.
2020-11-01Avoid dumpprivkey and watchonly behavior in rpc_signrawtransaction.pyAndrew Chow
dumpprivkey and watchonly behavior don't work with descriptor wallets. Test for multisigs is modified to not rely on watchonly behavior for those multisigs. This has a side effect of removing listunspent, but that's not the target of this test, so that's fine.
2020-07-15test: ensure OP_1NEGATE satisfies BIP62 minimal push ruleJon Atack
with a regression test for PR 13084 and PR 17204.
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-12test: add rpc_signrawtransaction loggingJon Atack
2020-04-12test: refactor rpc_signrawtransaction witness script testsJon Atack
to see what is distinct in each test.
2020-04-07test: Use one node to avoid a race due to missing sync in rpc_signrawtransactionMarcoFalke
2020-03-31Correctly compute redeemScript from witnessScript for signrawtransactionAndrew Chow
ParsePrevouts uses GetScriptForWitness on the given witnessScript to find the corresponding redeemScript. This is incorrect when the witnessScript is either a P2PK or P2PKH script as it returns the corresponding P2WPK script instead of turning the witnessScript into a P2WSH script. Instead this should make the script a WitnessV0ScriptHash destination and get the script for that. Test cases are also added.
2019-12-09test: re-enable CLI test support by using EncodeDecimal in json.dumps()fanquake
As mentioned in https://github.com/bitcoin/bitcoin/pull/17675#issuecomment-563188648
2019-12-06tests: Mark functional tests not supporting bitcoin-cli (--usecli) as suchpracticalswift
2019-03-22[rpc] Remove signrawtransaction warningJohn Newbery
signrawtransaction was deprecated in 0.17 and removed in 0.18. A warning was left in place to tell users to migrate to using signrawtransactionswithwallet or signrawtransactionwithkey. Remove the warning now that it's been two releases since the method was removed.
2019-03-02scripted-diff: Update copyright in ./testMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2019-03-02scripted-diff: test: Use py3.5 bytes::hex() methodMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e "s/def bytes_to_hex_str/def b_2_x/g" $(git grep -l bytes_to_hex_str) export RE_B_0="[^()]*" # match no bracket export RE_B_1="${RE_B_0}\(${RE_B_0}\)${RE_B_0}" # match exactly one () export RE_B_2="${RE_B_0}\(${RE_B_1}\)${RE_B_0}" # match wrapped (()) export RE_M="(b2x|bytes_to_hex_str)\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\)" sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l -E '(b2x|bytes_to_hex_str)') sed -i --regexp-extended -e "/ +bytes_to_hex_str( as b2x)?,/d" $(git grep -l bytes_to_hex_str) sed -i --regexp-extended -e "s/ +bytes_to_hex_str( as b2x)?,//g" $(git grep -l bytes_to_hex_str) sed -i --regexp-extended -e "s/, bytes_to_hex_str( as b2x)?//g" $(git grep -l bytes_to_hex_str) export RE_M="(binascii\.)?hexlify\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\).decode\(${RE_B_0}\)" sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l hexlify -- ':(exclude)share') sed -i --regexp-extended -e "/from binascii import hexlify$/d" $(git grep -l hexlify -- ':(exclude)share') sed -i --regexp-extended -e "s/(from binascii import) .*hexlify/\1 unhexlify/g" $(git grep -l hexlify -- ':(exclude)share') sed -i -e 's/ignore-names "/ignore-names "b_2_x,/g' ./test/lint/lint-python-dead-code.sh -END VERIFY SCRIPT-
2019-02-13Add test for P2SH-P2WSH in signrawtransactionwithkey and listunspentMeshCollider
2018-09-25[wallet] remove redundand restart nodegustavonalle
2018-09-24[wallet] Ensure wallet is unlocked before signinggustavonalle
2018-09-10qa: Run all tests even if wallet is not compiledMarcoFalke
2018-08-27[rpc] Remove deprecated sigrawtransaction rpc method.John Newbery
2018-08-13tests: Use explicit importspracticalswift
2018-07-27Update copyright headers to 2018DrahtBot
2018-02-17Add test for signrawtransactionAndrew Chow
Add a brief test for signrawtransaction to ensure that compatibility is maintained.
2018-02-17Split signrawtransaction into wallet and non-walletAndrew Chow
Splits signrwatransaction into a wallet version (signrawtransactionwithwallet) and non-wallet version (signrawtransactionwithkey). signrawtransaction is marked as DEPRECATED and will call the right signrawtransaction* command as per the parameters in order to maintain compatibility. Updated signrawtransactions test to use new RPCs
2018-01-25[tests] Rename rpc_* functional tests.Anthony Towns