aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-07-27Replace ismine with producesignature check in witnessifierAndrew Chow
Instead of using ismine to check whether an address can be spent by us, make the witness version of the script or address first and then use ProduceSignature with the DummySignatureCreator to check if we can solve for the script. Also fixes test cases to reflect this change.
2017-07-26Fix misleading "Method not found" multiwallet errorsRussell Yanofsky
Raise RPC_WALLET_NOT_SPECIFIED instead of RPC_METHOD_NOT_FOUND when a required wallet filename was not specified in an RPC call. Also raise more specific RPC_WALLET_NOT_FOUND error instead of RPC_INVALID_PARAMETER in case an invalid wallet was specified, for consistency.
2017-07-25Revert "[tests] Allow tests to pass when stderr is non-empty"Wladimir J. van der Laan
This reverts commit d64ac3f4aab13a1a4e8d320b52e7a2b934e011b2 after further discussion. Tree-SHA512: db1e4ff5b17bcd6fd000a3d21aa74f6b7e4c194e0663c1896a100612671910a7cdadd896b59642420ea016598895b54a8468914847ebefef105a3c47c311d4b2
2017-07-25Merge #10703: [tests] Allow tests to pass when stderr is non-emptyMarcoFalke
d64ac3f [tests] Allow tests to pass when stderr is non-empty (Jonas Schnelli) Pull request description: Resurrect #10241 with nits addressed Not sure how much people want this. Would be useful for functional tests which cause bitcoind to print to stderr. Tree-SHA512: 28caccf7818fb3ed5a38caef7f77161b1678aa9b8fd12c2d1e76032f409f0d33c40f7ac91e0c8d908df4a44fd01cf97d657a08bae50c6ff17d07f5b2e20c3a6e
2017-07-24Merge #9622: [rpc] listsinceblock should include lost transactions when ↵Wladimir J. van der Laan
parameter is a reorg'd block 876e92b Testing: listsinceblock should display all transactions that were affected since the given block, including transactions that were removed due to a reorg. (Karl-Johan Alm) f999c46 listsinceblock: optionally find and list any transactions that were undone due to reorg when requesting a non-main chain block in a new 'removed' array. (Karl-Johan Alm) Pull request description: The following scenario will not notify the caller of the fact `tx0` has been dropped: 1. User 1 receives BTC in tx0 from utxo1 in block aa1. 2. User 2 receives BTC in tx1 from utxo1 (same) in block bb1 3. User 1 sees 2 confirmations at block aa3. 4. Reorg into bb chain. 5. User 1 asks `listsinceblock aa3` and does not see that tx0 is now invalidated. See `listsinceblock.py` commit for related test. The proposed fix is to iterate from the given block down to the fork point, and to check each transaction in the blocks against the wallet, in addition to including all transactions from the fork point to the active chain tip (the current behavior). Any transactions that were present will now also be listed in the `listsinceblock` output in a new `replaced` array. This operation may be a bit heavy but the circumstances (and perceived frequency of occurrence) warrant it, I believe. Example output: ```Python { 'transactions': [], 'replaced': [ { 'walletconflicts': [], 'vout': 1, 'account': '', 'timereceived': 1485234857, 'time': 1485234857, 'amount': '1.00000000', 'bip125-replaceable': 'unknown', 'trusted': False, 'category': 'receive', 'txid': 'ce673859a30dee1d2ebdb3c05f2eea7b1da54baf68f93bb8bfe37c5f09ed22ff', 'address': 'miqEt4kWp9zSizwGGuUWLAmxEcTW9bFUnQ', 'label': '', 'confirmations': -7 } ], 'lastblock': '7a388f27d09e3699102a4ebf81597d974fc4c72093eeaa02adffbbf7527f6715' } ``` I believe this addresses the comment by @luke-jr in https://github.com/bitcoin/bitcoin/pull/9516#issuecomment-274190081 but I could be wrong.. Tree-SHA512: 607b5dcaeccb9dc0d963d3de138c40490f3e923050b29821e6bd513d26beb587bddc748fbb194503fe618cfe34a6ed65d95e8d9c5764a882b6c5f976520cff35
2017-07-21[QA] Avoid running multiwallet.py twiceJonas Schnelli
2017-07-21Testing: listsinceblock should display all transactions that were affected ↵Karl-Johan Alm
since the given block, including transactions that were removed due to a reorg.
2017-07-20[wallet] [tests] Add listwallets to multiwallet testJohn Newbery
2017-07-20Merge #10571: [RPC]Move transaction combining from signrawtransaction to new RPCWladimir J. van der Laan
6b4f231 Move transaction combining from signrawtransaction to new RPC (Andrew Chow) Pull request description: Create a combinerawtransaction RPC which accepts a json array of hex raw transactions to combine them into one transaction. Signrawtransaction is changed to no longer combine transactions and only accept one transaction at a time. The tests have been updated to test this. Tests for the signrawtransaction merge have also been removed. This is part of #10570 Tree-SHA512: 035aebbd6537c1c017d5c8e06d309228b4c23fe52d5b31ffde19741c81a11a6346ddbbdc582b77b02a47f4c22b1952b69d3c2ee1109c29b3f0f1b612d8de53ed
2017-07-19Merge #10681: add gdb attach process to test READMEMarcoFalke
7ec3343 add gdb attach process to test README (Gregory Sanders) Pull request description: Saved me many hours. h/t to @jnewbery for the new guide efforts Tree-SHA512: 4d8ba1717eb842201079488f1cfe369d5d5114df5278643a3f996c986a51e3e039ea994a6f2f06bf6607b697388ad6561198da4693e3cb1ca4a8424e6d423d85
2017-07-18Move transaction combining from signrawtransaction to new RPCAndrew Chow
Create a combinerawtransaction RPC which accepts a json array of hex raw transactions to combine them into one transaction. Signrawtransaction is changed to no longer combine transactions and only accept one transaction at a time.
2017-07-18Merge #10784: Do not allow users to get keys from keypool without reserving themWladimir J. van der Laan
cf82a9e Do not allow users to get keys from keypool without reserving them (Matt Corallo) Pull request description: fundrawtransaction allows users to add a change output and then not have it removed from keypool. While it would be nice to have users follow the normal CreateTransaction/CommitTransaction process we use internally, there isnt much benefit in exposing this option, especially with HD wallets, while there is ample room for users to misunderstand or misuse this option. This partially reverts #9377. Would be nice to get this for 15 since its kinda crazy we have this option to begin with IMO, will need release notes as an RPC option is now ignored. Tree-SHA512: 72b5ee9c4a229b84d799dfb00c56fe80d8bba914ce81a433c3f5ab325bf9bf2b839ee658c261734f0ee183ab19435039481014d09c41dbe155e6323e63beb01d
2017-07-18Do not allow users to get keys from keypool without reserving themMatt Corallo
fundrawtransaction allows users to add a change output and then not have it removed from keypool. While it would be nice to have users follow the normal CreateTransaction/CommitTransaction process we use internally, there isnt much benefit in exposing this option, especially with HD wallets, while there is ample room for users to misunderstand or misuse this option. This could be particularly nasty in some use-cases (especially pre-HD-split) - eg a user might fundrawtransaction, then call getnewaddress, hand out the address for someone to pay them, then sendrawtransaction. This may result in the user thinking they have received payment, even though it was really just their own change! This could obviously result in needless key-reuse.
2017-07-17[QA] add basic multiwallet testJonas Schnelli
2017-07-17[tests] [wallet] Add wallet endpoint support to authproxyJohn Newbery
2017-07-15[wallet] fix zapwallettxes interaction with persistent mempoolJohn Newbery
zapwallettxes previously did not interact well with persistent mempool. zapwallettxes would cause wallet transactions to be zapped, but they would then be reloaded from the mempool on startup. This commit softsets persistmempool to false if zapwallettxes is enabled so transactions are actually zapped.
2017-07-15[tests] fix flake8 warnings in zapwallettxes.pyJohn Newbery
2017-07-11Merge #10190: [tests] mining functional tests (including regression test for ↵Wladimir J. van der Laan
submitblock) 11ba8e9 [tests] rename getblocktemplate_proposals.py to mining.py (John Newbery) b29dd41 [tests] add test for submit block (John Newbery) 9bf0d80 [tests] run successful test in getblocktemplate first (John Newbery) 82dc597 [tests] don't build blocks manually in getblocktemplate test (John Newbery) f82c709 [tests] clarify assertions in getblocktemplate test (John Newbery) 66c570a [tests] Don't build the coinbase manually in getblocktemplate test (John Newbery) 38b38cd [tests] getblocktemplate_proposals.py: add logging (John Newbery) 0a3a5ff [tests] Fix flake8 warnings in getblocktemplate tests (John Newbery) 32cffe6 [tests] Fix import order in getblocktemplate test (John Newbery) Tree-SHA512: a51a57314fa1c4c4b8a7896492ec6e677b6bed12387060def34a62e9dfbee7961f71bb5553fbd70028be61ae32eccf13fd255fa9651f908e9a5e64c28f43f00e
2017-07-07Merge #10759: Fix multi_rpc test for hosts that dont default to utf8MarcoFalke
bc7d103 Fix multi_rpc test for hosts that dont default to utf8 (Matt Corallo) Tree-SHA512: 7644b1f50d4010a08aed5d1c87ab7326af9c109ac05dfbfc4bb6d5a19ace7997ef9cdd64d4301072f1106225de6d3aacccb17f53043b55ba61f5723c2b65af30
2017-07-07[tests] fix replace_by_fee.pyJohn Newbery
fb915d5b183adb915c72bb11c6f3b418841e3512 changed the optIntoRbf field in fundrawtransaction to replaceable. This commit fixes up replace-by-fee.py to use the new option name.
2017-07-06Fix multi_rpc test for hosts that dont default to utf8Matt Corallo
Otherwise the utf8 written to bitcoin.conf throws an exception when read from get_auth_cookie
2017-07-06[qa] Rewrite BIP66 functional testsSuhas Daftuar
Rewrite the BIP66 functional tests to reflect height-based activation, and move it out of the extended test suite. Remove the unnecessary bipdersig.py test
2017-07-02[tests] nits in dbcrash.pyJohn Newbery
2017-07-01Fix MD formatting in REST-interface.md and spelling mistake inMeshCollider
test_runner.py
2017-06-30[qa] Rewrite BIP65 functional testsSuhas Daftuar
After 122786d0e0170c73536360b705af711e1338adbf, BIP65 activates at a particular height (without regard to version numbers of blocks below that height). Rewrite the BIP65 functional tests to take this into account, and add a test case that exercises OP_CHECKLOCKTIMEVERIFY in a block where the soft-fork is active. Also moves the bip65 functional test out of the extended test suite.
2017-06-29[tests] fix nits.John Newbery
Thanks to Marco Falke.
2017-06-29[tests] Allow tests to pass when stderr is non-emptyJonas Schnelli
Tests which pass with non-empty stderr are reported as "passed with warnings"
2017-06-29[tests] reorganize utils.py module (code move only)John Newbery
This commit re-organizes the utils.py module into logical sections.
2017-06-29[tests] move mocktime property and functions to BitcoinTestFrameworkJohn Newbery
2017-06-29[tests] Move stop_node and start_node methods to BitcoinTestFrameworkJohn Newbery
This commit moves functions start_node, start_nodes, stop_node and stop_nodes functions into the BitcoinTestFramework class. It also moves the bitcoind_processes dict and coverage variables into BitcoinTestFramework.
2017-06-29[tests] fix flake8 warnings in test_framework.py and util.pyJohn Newbery
2017-06-29[tests] remove unused imports from utils.pyJohn Newbery
2017-06-28Merge #10148: Use non-atomic flushing with block replayWladimir J. van der Laan
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar) d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo) eaca1b7 Random db flush crash simulator (Pieter Wuille) 0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille) 013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille) b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille) Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
2017-06-28Merge #10690: [qa] Bugfix: allow overriding extra_args in ↵MarcoFalke
ComparisonTestFramework 4ed3653 [qa] Bugfix: allow overriding extra_args in ComparisonTestFramework (Suhas Daftuar) Tree-SHA512: d8f724b3324aad73a7b15cf87ff394e8d615bf3cd5a394d5715347d833f2ae9ac745a944202986866255eca5fc105ea06ab3abe12e168b67de34482f751c68e2
2017-06-28[qa] Bugfix: allow overriding extra_args in ComparisonTestFrameworkSuhas Daftuar
2017-06-27Merge #10659: [qa] blockchain: Pass on closed connection during generate callWladimir J. van der Laan
fab1fb7 [qa] blockchain: Pass on closed connection during generate call (MarcoFalke) Tree-SHA512: 754be08675c3aca6f8003dc4bc68336e3693609ec14afc91cec592603aabe515f82534ef7b3db469792458ae4c70d5eae0ea0e8abd0ea338e22351aa01173046
2017-06-27add gdb attach process to test READMEGregory Sanders
2017-06-27[tests] rename getblocktemplate_proposals.py to mining.pyJohn Newbery
2017-06-27[tests] add test for submit blockJohn Newbery
2017-06-27[tests] run successful test in getblocktemplate firstJohn Newbery
2017-06-27[tests] don't build blocks manually in getblocktemplate testJohn Newbery
2017-06-27[tests] clarify assertions in getblocktemplate testJohn Newbery
2017-06-27[tests] Don't build the coinbase manually in getblocktemplate testJohn Newbery
2017-06-27[tests] getblocktemplate_proposals.py: add loggingJohn Newbery
2017-06-27[tests] Fix flake8 warnings in getblocktemplate testsJohn Newbery
2017-06-27[tests] Fix import order in getblocktemplate testJohn Newbery
2017-06-27Merge #10612: The young person's guide to the test_frameworkWladimir J. van der Laan
e7ba6c1 [tests] add example test (John Newbery) 76859e6 [tests] Update functional tests documentation (John Newbery) Tree-SHA512: 74eb464e965e16466f95b9eda7d1e89a31ef1ef204dd30e1b11ddf482336f12f33fa5ca3cc733b6eaf440c46401e663585af9caca202deddb440bbadce964a62
2017-06-27[tests] add example testJohn Newbery
2017-06-27[tests] Update functional tests documentationJohn Newbery
2017-06-26[qa] Test non-atomic chainstate writesSuhas Daftuar
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the logic for recovering from a crash during chainstate flush. dbcrash.py is added to the extended tests, as it may take ~10 minutes to run Use _Exit() instead of exit() for crash simulation This eliminates stderr output such as: terminate called without an active exception or Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104. Eliminating the stderr output on crash simulation allows testing with test_runner.py, which reports a test as failed if stderr is produced.