aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2017-11-02[qa] test that invalid blocks on an invalid chain get a disconnectMatt Corallo
Github-Pull: #11531 Rebased-From: 00dcda60f6ee63d35bec640f27efe2338dd71270
2017-11-02Accept unrequested blocks with work equal to our tipMatt Corallo
This is a simple change that makes our accept requirements the same as our request requirements, (ever so slightly) further decoupling our consensus logic from our FindNextBlocksToDownload logic in net_processing. Github-Pull: #11531 Rebased-From: 932f118e6a3779bb3d6c3cc83963cf34ac150e42
2017-11-02Rewrite p2p-acceptblock in preparation for slight behavior changesMatt Corallo
Removes checking whitelisted behavior (which will be removed, the difference in behavior here makes little sense) and no longer requires that blocks at the same work as our tip be dropped if not requested (in part because we *do* request those blocks). Github-Pull: #11531 Rebased-From: 3b4ac43bc371561b5fa559bccb17dc0702bd4b69
2017-11-02Disconnecting from bad outbound peers in IBDSuhas Daftuar
When in IBD, we'd like to use all our outbound peers to help us sync the chain. Disconnect any outbound peers whose headers have insufficient work. Github-Pull: #11490 Rebased-From: c60fd71a65e841efe187992f46c583a704cc37f5
2017-11-02qa: add test for minchainwork use in acceptblockSuhas Daftuar
Github-Pull: #11458 Rebased-From: 08fd822771bf8dae1c21698811f57aa691b2f25d
2017-11-02[qa] Test nMinimumChainWorkSuhas Daftuar
Nodes don't consider themselves out of "initial block download" until their active chain has more work than nMinimumChainWork. While in initial block download, nodes won't relay blocks to their peers, so test that this parameter functions as intended by verifying that block relay only succeeds past a given node once its nMinimumChainWork has been exceeded. Github-Pull: #10357 Rebased-From: eac64bb7a3b6aba747403b23b3b1d3609843f8db
2017-11-01qa: Remove never used return value of sync_with_pingMarcoFalke
Github-Pull: #11472 Rebased-From: fafa0039708e15d1067be091b2bfc10195afa480
2017-11-01qa: Make tmpdir option an absolute pathMarcoFalke
This should fix issues with the multiwallet test and symlinks when the tmpdir is a relative path. Rather than fixing os.symlink to work with paths relative to a directory descriptor, which does not work on Windows, normalize the path instead. Github-Pull: #11472 Rebased-From: fa9de370b17297d6dd542da627c8dd2b31aec340
2017-11-01Avoid opening copied wallet databases simultaneouslyRussell Yanofsky
Make sure wallet databases have unique fileids. If they don't, throw an error. BDB caches do not work properly when more than one open database has the same fileid, because values written to one database may show up in reads to other databases. Bitcoin will never create different databases with the same fileid, but users can create them by manually copying database files. BDB caching bug was reported by Chris Moore <dooglus@gmail.com> https://github.com/bitcoin/bitcoin/issues/11429 Fixes #11429 Github-Pull: #11476 Rebased-From: 478a89c1ef79a75275d1b508122c06eee9386b2d
2017-11-01Ensure backupwallet fails when attempting to backup to source fileTomas van der Wansem
Previous behaviour was to destroy the wallet (to zero-length) Github-Pull: #11376 Rebased-From: 5d465e396249a0e2cc60b16984a2bdbe4c8993c3
2017-11-01scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc errorJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/assert_raises_jsonrpc/assert_raises_rpc_error/g' test/functional/*py test/functional/test_framework/*py -END VERIFY SCRIPT- Github-Pull: #10853 Rebased-From: 47ba8cf71e9a3a6f7452488fc9ab3b350f0fae36
2017-11-01[tests] do not allow assert_raises_message to be called with JSONRPCExceptionJohn Newbery
Github-Pull: #10853 Rebased-From: 677d893ff758b61f66203730da224bd7ef8f0b43
2017-11-01[tests] remove direct testing on JSONRPCException from individual test casesJohn Newbery
Github-Pull: #10853 Rebased-From: 5864e9c1611e6034a8d49b78231abe6bfade686d
2017-11-01Merge #11550: [0.15.1] qa: BackportsWladimir J. van der Laan
01223a0 [verify-commits] Allow revoked keys to expire (Matt Corallo) adbc9d1 qa: Fix race condition in sendheaders.py (Suhas Daftuar) fdad04e qa: Fix replace-by-fee race condition failures (Suhas Daftuar) Pull request description: Tree-SHA512: e1532a02a84d9406cc78975a59201dbde78750217d504896e7e448aa86d6b4df98dc959fae440044c8f9aedebf296a9537b18e281976344ca8e4b705d7bd50b0
2017-11-01Make listsinceblock refuse unknown block hashRussell Yanofsky
Change suggested by Cory Fields <cory-nospam-@coryfields.com> who noticed listsinceblock would ignore invalid block hashes causing it to return a completely unfiltered list of transactions. Github-Pull: #11565 Rebased-From: 659b2061c4329472a45e913c5d45e6ab180600a3 Tree-SHA512: 2091a830b730421b49c806cb83a16c7da2ec0a7adac2bac0585324aad12a32bb99a840264c3d346937ea84786fac56e44befb6641511a417977803875efe5a21
2017-10-23qa: Fix race condition in sendheaders.pySuhas Daftuar
Github-Pull: #11538 Rebased-From: 6d51eaefe924bfaf2b0f4928dd6020023733480f
2017-10-23qa: Fix replace-by-fee race condition failuresSuhas Daftuar
Github-Pull: #11538 Rebased-From: c96b2e4f096780c75e3fa8acba496d71322583a1
2017-10-18Merge #11447: 0.15.1: BackportsWladimir J. van der Laan
20cdc2b Fix importmulti bug when importing an already imported key (Pedro Branco) 405e069 Update importprivkey named args documentation (Dusty Williams) c94527a [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake) 27e861a net: Improve and document SOCKS code (Wladimir J. van der Laan) dea3b87 Add new step to clean $PATH var by removing /mnt specific Window's %PATH% paths that cause issues with the make system (Donal OConnor) a43be5b rpc: Prevent `dumpwallet` from overwriting files (Wladimir J. van der Laan) b6c0209 Fix validationinterface build on super old boost/clang (Matt Corallo) 6a62c74 qt: Backup former GUI settings on `-resetguisettings` (Wladimir J. van der Laan) 0fe2a9a when clearing addrman clear mapInfo and mapAddr (Gregory Sanders) 6b4d9f2 wallet: update stored witness in AddToWallet (Suhas Daftuar) 62d18cd doc: Prepare release notes for 0.15.1 (MarcoFalke) 8b61aee Put back inadvertently removed copyright notices (Paul Berg) 75997c3 Disallow uncompressed pubkeys in bitcoin-tx [multisig] output adds (Matt Corallo) 8d13b42 Replace save|restoreWindowGeometry with Qt functions (MeshCollider) 6642558 [Qt] Add delay before filtering transactions Fixes 3141 (Lucas Betschart) 19d63e8 Remove custom fee radio group (Andrew Chow) b1a6c94 rpc: make estimatesmartfee argument naming consistent with documentation (Wladimir J. van der Laan) 921542e rpc: update cli for estimatefee argument rename (Wladimir J. van der Laan) 2e31b1d Fix division by zero in time remaining (MeshCollider) 47c02a8 qt: Use IsMine to validate custom change address (Chris Moore) 7310f1f [Qt] Fix display of package name on 'open config file' tooltip (Daniel Edgecumbe) 2cb720a Acquire cs_main lock before cs_wallet during wallet initialization (Russell Yanofsky) b278a43 rpc: Write authcookie atomically (Wladimir J. van der Laan) 50bd3f6 Avoid returning a BIP9Stats object with uninitialized values (practicalswift) 9e8aae3 [wallet] Close DB on error. (Karl-Johan Alm) Pull request description: This mostly backports various commits that fix(ed) bugs and issues. However, it also includes two patches for qt that only fix minor issues, as well as some doc patches. Tree-SHA512: 5165e309faf6b4395fdf2f6662ccc0d58306971f3769e675504f17b2055efe29b2919f22d0dbf78c4c2dc7fd5c9d08a2c53345615e4a1df73914526687c9d571
2017-10-17Fix importmulti bug when importing an already imported keyPedro Branco
Github-Pull: #11483 Rebased-From: a44a215177ab55b4a3b36a7980c313e908e2dd18
2017-10-09Update importprivkey named args documentationDusty Williams
Fixes #11462. Updated documentation for importprivkey function to use the correct name for the first argument. Also updates a call to importprivkey to use named args in functional test. Github-Pull: #11465 Rebased-From: aa57590d7c5eab1df5443e8ac9ed53ad0db46c02
2017-10-04rpc: Prevent `dumpwallet` from overwriting filesWladimir J. van der Laan
Prevent arbitrary files from being overwritten. There have been reports that users have overwritten wallet files this way. It may also avoid other security issues. Fixes #9934. Adds mention to release notes and adds a test. Github-Pull: #9937 Rebased-From: 0cd9273fd959c6742574259d026039f7da0309a2
2017-10-03add functional test for mempoolreplacement command line argGregory Sanders
Github-Pull: #11407 Rebased-From: 1088b5322d0e7a8366a285e2baa49c766a9ba5bd
2017-10-03Fix bip68-sequence rpc testJohnson Lau
Github-Pull: #11399 Rebased-From: 49f869fe91716785b3276925d64bf8955feff69f
2017-10-03qa: Fix bug introduced in p2p-segwit.pySuhas Daftuar
Changing __init__() -> set_test_params() in the tests should not have applied to NodeConnCB-derived objects. Github-Pull: #11319 Rebased-From: f97ab35fa9687fd5c110ad6cca5be5b4a5c2142d
2017-10-03qa: Treat mininode p2p exceptions as fatalSuhas Daftuar
Github-Pull: #11319 Rebased-From: a7820422e0b182db6f1df8904242e5d76d6c73fa
2017-10-03Tests for zmqpubrawtx and zmqpubrawblockAndrew Chow
Github-Pull: #10552 Rebased-From: d3677ab757ea57b21d8aed24d5bc3c4bfe9bb68c
2017-10-03[tests] Check connectivity before sending in assumevalid.pyJohn Newbery
assumevalid.py would try to send over a closed P2P connection in a loop, hitting the following failure many times: TestFramework.mininode (ERROR): Cannot send message. No connection to node! The test still passes, but this is a lot of noise in the test log. Just check that the connection is open before trying to send. Github-Pull: #11345 Rebased-From: e9e9391083721ca9733cc00a1907384f83b6435e
2017-10-03[tests] Make p2p-leaktests.py more robustJohn Newbery
Github-Pull: #11078 Rebased-From: 0063d2c3dce9d9c1678197d2c65ee878793d1ef9
2017-10-03[qa] zapwallettxes: Wait up to 3s for mempool reloadMarcoFalke
Github-Pull: #11308 Rebased-From: fadd0c16b6bd62e9d663d906755320ae089e02d3
2017-10-03Add listwallets RPC test to multiwallet.pyCristian Mircea Messel
Github-Pull: #11310 Rebased-From: fb1f3258225a7052f4fc9e3f2accc3811c53e221
2017-10-03[tests] fixup dbcrash interaction with add_nodes()John Newbery
Github-Pull: #11230 Rebased-From: 8fdb6f9126fe1e13b60de11fd34c204247679ef4
2017-10-03[test] Replace check_output with low level versionJoão Barbosa
Github-Pull: #11125 Rebased-From: ce379b47b92d6c04250c21719bb1abfb41c586ad
2017-10-03[test] Add assert_raises_process_error to assert process errorsJoão Barbosa
Github-Pull: #11125 Rebased-From: 232e3e8471edb346c09f906c996b2f350cabc72a
2017-10-03[test] Add support for custom arguments to TestNodeCLIJoão Barbosa
Github-Pull: #11125 Rebased-From: 5c18a84b9a49e3f9dacf0502dbf7d5d755f38da6
2017-10-03[test] Improve assert_raises_jsonrpc docstringJoão Barbosa
Github-Pull: #11125 Rebased-From: e1274947d4574bb83a020d0e178f0e5db7fc6282
2017-10-03[qa] TestNode: Add wait_until_stopped helper methodMarcoFalke
Github-Pull: #11067 Rebased-From: faa8d9581affde35a8242c63fca8a52004d4f943
2017-10-03Improve signmessages functional testCristian Mircea Messel
This patch improves branch coverage of the test, making sure a message can not be verified with the wrong address or signature. Github-Pull: #11241 Rebased-From: b3d6fc654770e3b4d2f82e8d77e531df9e522982
2017-10-03[tests] fixups from set_test_params()John Newbery
Github-Pull: #11215 Rebased-From: 3918d93f3cd2305dc12cb964aebba0fc1f8720b4
2017-10-03[tests] Functional tests must explicitly set num_nodesJohn Newbery
Github-Pull: #11121 Rebased-From: 7148b74dc39110f53c665b94fa9d994c6ad6dc1c
2017-10-03[tests] don't override __init__() in individual testsJohn Newbery
Almost all test scripts currently need to override the __init__() method. When they do that they need to call into super().__init__() as the base class does some generic initialization. This commit makes the base class __init__() call into set_test_params() method. Individual test cases can override set_test_params() to setup their test parameters. Github-Pull: #11121 Rebased-From: 5448a1471d6fc638a2220ea5a2f3782172efe14c
2017-10-03[tests] Avoid passing around member variables in test_frameworkJohn Newbery
Github-Pull: #11121 Rebased-From: 6cf094a0229d051ab8a15189c8a0bc6011919e72
2017-10-03[tests] TestNode: separate add_node from start_nodeJohn Newbery
Separates the act of creating a TestNode object from starting the node. The test_framework now keeps track of its list of TestNodes, and test writers can call start_node() and stop_node() without having to update the self.nodes list. Github-Pull: #11121 Rebased-From: 36b626867087e9fae6d85f926248997ebff327b7
2017-10-03[tests] fix - use rpc_timeout as rpc timeoutJohn Newbery
Github-Pull: #11121 Rebased-From: be2a2ab6a67beef97e3c3cf42bd5eeea6c4e55cf
2017-10-03Add getmininginfo functional testCristian Mircea Messel
Github-Pull: #11150 Rebased-From: 4f2905b76b502a9de235dbe739e5fe504ef5bc22
2017-10-03RPC: gettxout: Slightly improve doc and testsJorge Timón
Github-Pull: #10859 Rebased-From: 6d2d2eb49389d70a5db327e133c9c90748f82d5f
2017-10-03[tests] Add bitcoin_cli.py test scriptJohn Newbery
Github-Pull: #10798 Rebased-From: c6ec4358a797b7a11283238a0cf0b4531def9e92
2017-10-03[tests] add TestNodeCLI class for calling bitcoin-cli for a nodeJohn Newbery
Github-Pull: #10798 Rebased-From: b23549f6e677a8e22953568704eac7ea0c2c1289
2017-10-03qa: Move wait_until to utilMarcoFalke
Github-Pull: #11068 Rebased-From: 08ce33f8e95efa81b37ddc6b3350462c61bbfd51
2017-10-03[tests] fix timeout issues from TestNodeJohn Newbery
Fixes a couple of bugs from the introduction of TestNode: - test scripts were no longer able to specify a custom timeout for starting a node. Therefore tests with nodes that take a long time to start up (eg pruning.py) would fail. - the test for whether a node has failed on start up was broken by changing 'assert x is None' to 'assert not x'. Since subprocess.poll() can return None (indicating the node is still running) or 0 (indicating the node exited with return code 0), this was a regression. Github-Pull: #11077 Rebased-From: 2b4ea520b717b3ca894adbac17796786667764d3
2017-10-03test: Increase initial RPC timeout to 60 secondsWladimir J. van der Laan
When running the tests locally with a parallelism of 4 on an otherwise busy system, RPC can take quite a wait to come up. Change the timeout to 60 seconds just to be safe. Github-Pull: #11091 Rebased-From: c1470a058f21bf98d83b9dc345c61626b87035cc