aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-09-29[rpc] getblockchaininfo: add size_on_disk, prune_target_size, automatic_pruningDaniel Edgecumbe
Fix pruneheight help text. Move fPruneMode block to match output ordering with help text. Add functional tests for new fields in getblockchaininfo.
2017-09-29Merge #11319: [qa] Fix error introduced into p2p-segwit.py, and prevent ↵MarcoFalke
future similar errors f97ab35fa qa: Fix bug introduced in p2p-segwit.py (Suhas Daftuar) a7820422e qa: Treat mininode p2p exceptions as fatal (Suhas Daftuar) Pull request description: #11121 inadvertently broke the constructor for the `TestNode()` object in `p2p-segwit.py`, silently breaking at least one of the tests. Although the python code was raising exceptions due to a `TestNode()` object not existing (or having the right type), mininode was masking these from anyone running the test through the test_runner (like travis), because it catches all exceptions during message delivery and just prints a log message and continues. Such "graceful" handling of errors is almost certainly something we don't want in our test suite, so the first commit here attempts to prevent that type of failure from ever being masked. The second commit fixes the particular bug in `p2p-segwit.py`. Tree-SHA512: b6646e3cb1e05c35c28e8899c44104bf2e2d0384643ca87042ab7f6ec0960d89f5bf25a7b95bab6e32d401c20a6018226160500f6ddceb923e81ffb04adb4f2f
2017-09-29Merge #10552: [Test] Tests for zmqpubrawtx and zmqpubrawblockMarcoFalke
d3677ab75 Tests for zmqpubrawtx and zmqpubrawblock (Andrew Chow) Pull request description: Tree-SHA512: 9e367fd8936514bfb567ef3f3d83770d374287354b59c9187e844056dd086e8aa2de32ce55d35486cecd706e7c93cd1c1e2709ee82d3dddb805827be8d2bcb14
2017-09-29Merge #11167: Full BIP173 (Bech32) supportWladimir J. van der Laan
8213838 [Qt] tolerate BIP173/bech32 addresses during input validation (Jonas Schnelli) 06eaca6 [RPC] Wallet: test importing of native witness scripts (NicolasDorier) fd0041a Use BIP173 addresses in segwit.py test (Pieter Wuille) e278f12 Support BIP173 in addwitnessaddress (Pieter Wuille) c091b99 Implement BIP173 addresses and tests (Pieter Wuille) bd355b8 Add regtest testing to base58_tests (Pieter Wuille) 6565c55 Convert base58_tests from type/payload to scriptPubKey comparison (Pieter Wuille) 8fd2267 Import Bech32 C++ reference code & tests (Pieter Wuille) 1e46ebd Implement {Encode,Decode}Destination without CBitcoinAddress (Pieter Wuille) Pull request description: Builds on top of #11117. This adds support for: * Creating BIP173 addresses for testing (through `addwitnessaddress`, though by default it still produces P2SH versions) * Sending to BIP173 addresses (including non-v0 ones) * Analysing BIP173 addresses (through `validateaddress`) It includes a reformatted version of the [C++ Bech32 reference code](https://github.com/sipa/bech32/tree/master/ref/c%2B%2B) and an independent implementation of the address encoding/decoding logic (integrated with CTxDestination). All BIP173 test vectors are included. Not included (and intended for other PRs): * Full wallet support for SegWit (which would include automatically adding witness scripts to the wallet during automatic keypool topup, SegWit change outputs, ...) [see #11403] * Splitting base58.cpp and tests/base58_tests.cpp up into base58-specific code, and "address encoding"-code [see #11372] * Error locating in UI for BIP173 addresses. Tree-SHA512: 238031185fd07f3ac873c586043970cc2db91bf7735c3c168cb33a3db39a7bda81d4891b649685bb17ef90dc63af0328e7705d8cd3e8dafd6c4d3c08fb230341
2017-09-28[RPC] Wallet: test importing of native witness scriptsNicolasDorier
Integration into segwit.py test by Pieter Wuille.
2017-09-28Use BIP173 addresses in segwit.py testPieter Wuille
2017-09-28Implement BIP173 addresses and testsPieter Wuille
2017-09-28Merge #10858: [RPC] Add "errors" field to getblockchaininfo and unify ↵Wladimir J. van der Laan
"errors" field in get*info RPCs 395cef7 Change getmininginfo errors field to warnings (Andrew Chow) 8502b20 Unify help text for GetWarnings output in get*info RPCs (Andrew Chow) f77f0e4 Add warnings field to getblockchaininfo (Andrew Chow) Pull request description: The `getblockchaininfo` output does not contain the `errors` field which the `getinfo`, `getmininginfo`, and `getnetworkinfo` RPCs have. It should have it as the errors pertain to the blockchain. This PR adds that field. This PR also unifies the help text for the `errors` field and its output position so that all of the `get*info` commands are consistent. `getnetworkinfo`'s `errors` field is named `warnings`. I did not change this even though it is inconsistent since this naming has been in use for a long time. Tree-SHA512: 385ab6acfee67fc8816f4d51ab2bd7a623264c7973906dfbab0a171f199e9db16fde19093a5bc3dfbdd4ff5f19d2186b646eb6b3bae0a4d7c9add43650a4a9d9
2017-09-28Merge #10871: Handle getinfo in bitcoin-cli w/ -getinfo (revival of #8843)Wladimir J. van der Laan
5e69a43 Add test for bitcoin-cli -getinfo (John Newbery) 3826253 rpc: Handle `getinfo` locally in bitcoin-cli w/ `-getinfo` (Wladimir J. van der Laan) Pull request description: Since @laanwj doesn't want to maintain these changes anymore, I will. This PR is a revival of #8843. I have addressed @jnewbery's comments. Regarding atomicity, I don't think that is a concern here. This is explicitly a new API and those who use it will know that this is different and that it is not atomic. Tree-SHA512: 9664ed13a5557bda8c43f34d6527669a641f260b7830e592409b28c845258fc7e0fdd85dd42bfa88c103fea3ecdfede5f81e3d91870e2accba81c6d6de6b21ff
2017-09-27Add test for bitcoin-cli -getinfoJohn Newbery
Extra-Author: Andrew Chow <achow101@gmail.com>
2017-09-27Change getmininginfo errors field to warningsAndrew Chow
Changes the errors field to warnings. To maintain compatibility, the errors field is deprecated and enabled by starting bitcoind with -deprecatedrpc=getmininginfo
2017-09-27Add warnings field to getblockchaininfoAndrew Chow
2017-09-27Merge #11031: [rpc] deprecate estimatefeeMarcoFalke
048e0c3e2 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel) d4cdbd6fb [rpc] Deprecate estimatefee RPC (John Newbery) Pull request description: Deprecates estimatefee in v0.16, for final removal in v0.17. This commit introduces a phased removal of RPC methods. RPC method is disabled by default in version x, but can be enabled by using the `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version (x+1). This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored. This is a more generic version of the approach I tried to use in #10841, which too late to make it into v0.15. Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
2017-09-26[rpc] [tests] Add deprecated RPC testCristian Mircea Messel
2017-09-26[rpc] Deprecate estimatefee RPCJohn Newbery
Deprecate estimatefee in v0.16, for final removal in v0.17. This commit introduces a phased removal of RPC methods. RPC method is disabled by default in version x, but can be enabled by using the `-deprecatedrpc=<method>` argument. RPC method is removed entirely in version (x+1).
2017-09-26Merge #11377: Disallow uncompressed pubkeys in bitcoin-tx [multisig] output addsWladimir J. van der Laan
28d4542 Disallow uncompressed pubkeys in bitcoin-tx [multisig] output adds (Matt Corallo) Pull request description: Does what it says on the tin. Tree-SHA512: 324b8da8a9f9a35d3ade74f6c587f981894a085dfea9d64f78de745d5e6ec05c3a7bced487e9aad9c8a48151cd14969a0806f30f80b621edfce0da082fe6f4be
2017-09-20Disallow uncompressed pubkeys in bitcoin-tx [multisig] output addsMatt Corallo
2017-09-20[test] Add getblockchaininfo functional testJoão Barbosa
2017-09-20[test] Add restart_node to BitcoinTestFrameworkJoão Barbosa
2017-09-19Merge #11307: wallet: Display non-HD error on first runWladimir J. van der Laan
fadf31e wallet: Display non-HD error on first run (MarcoFalke) Pull request description: On current master a fresh wallet created with `-usehd=0` is silently created as HD wallet. An error should be displayed on the first run. Also, this restores a test that was removed in c22a53c Fixes: #11313 Tree-SHA512: 226a4129984324f88a431c7e2726383f6841711f0227d8e9f5b4f89d4bb9f2b8e922e6cf0a6f91d6efa747d139543a236b9f29326fc5d1e5d6f1dea2465d9b85
2017-09-18Tests for zmqpubrawtx and zmqpubrawblockAndrew Chow
2017-09-18Merge #11323: mininode: add an optimistic write and disable nagleMarcoFalke
1817398b3 mininode: add an optimistic write and disable nagle (Cory Fields) Pull request description: Disclaimer: I'm not familiar with asyncore, so I'm unclear how safe this is. It works for me (tm). Because the poll/select loop may pause for 100msec before actually doing a send, and we have no way to force the loop awake, try sending from the calling thread if the queue is empty. Also, disable nagle as all sends should be either full messages or unfinished sends. This shaves an average of ~1 minute or so off of my accumulated runtime, and 10-15 seconds off of actual runtime. Tree-SHA512: 6b61b8058e621dacf0b4dd353c10e3666fbda0691440eb6ebc432491ebada80a781dcd09291bf03e70112a41d3c2a0c91775ed08824b79bf8d0ebed11595c28b
2017-09-15[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.
2017-09-13mininode: add an optimistic write and disable nagleCory Fields
Because the poll/select loop may pause for 100msec before actually doing a send, and we have no way to force the loop awake, try sending from the calling thread if the queue is empty. Also, disable nagle as all sends should be either full messages or unfinished sends. This shaves an average of ~1 minute or so off of my accumulated runtime, and 10-15 seconds off of actual runtime.
2017-09-13Merge #11078: [tests] Make p2p-leaktests.py more robustMarcoFalke
0063d2c3d [tests] Make p2p-leaktests.py more robust (John Newbery) Pull request description: There has been an example of p2p-leaktests.py failing on travis in the new service bits test (introduced in #11001 . It appeared to me that the previous p2p connections had not been fully disconnected before attempting to add new p2p connections. I've added a sleep and restarted the NetworkThread, but I don't know whether this will fix the problem, since I'm unable to reproduce the failure locally. @MarcoFalke - not sure what you want to do here? I don't think this change could make things any worse. Tree-SHA512: f5427c26267185a903c9b75bb3925bf153b8afce70c8e493bf8f585f57d809d20643b4ee69081300b211d22e960242aecc3d719f4ddd230aa08fdc5484b55055
2017-09-13Merge #11308: [qa] zapwallettxes: Wait up to 3s for mempool reloadMarcoFalke
fadd0c16b [qa] zapwallettxes: Wait up to 3s for mempool reload (MarcoFalke) Pull request description: There had been intermittent test failures on zapwallettxes, as no time was allotted to reload the mempool. Tree-SHA512: 993254d2aaca6ea42fceefffed0cf90bdda91c64150179ef2a11337c3fe2cc6bf42b83ea9d9a1a575204fbde2676d7203443b00d053e8c2ed43e017c09d3ab11
2017-09-13qa: Fix bug introduced in p2p-segwit.pySuhas Daftuar
Changing __init__() -> set_test_params() in the tests should not have applied to NodeConnCB-derived objects.
2017-09-13qa: Treat mininode p2p exceptions as fatalSuhas Daftuar
2017-09-13Add listwallets RPC test to multiwallet.pyCristian Mircea Messel
2017-09-12[qa] zapwallettxes: Wait up to 3s for mempool reloadMarcoFalke
2017-09-12Merge #11230: [tests] fixup dbcrash interaction with add_nodes()MarcoFalke
8fdb6f912 [tests] fixup dbcrash interaction with add_nodes() (John Newbery) Pull request description: Another conflict with #11121. Apologies - this is entirely my fault. I didn't run the extended test suite after rebasing on master. @MarcoFalke @sdaftuar Tree-SHA512: eefce1d1c63dc4a63c5e030a541e046ad4832e8a709c0a8aad40ffdc4712b2065486778b406dfa57cfd34e66db86064278ee3fea8f2c2afd2390772875e6fa3e
2017-09-12wallet: Display non-HD error on first runMarcoFalke
2017-09-11Deprecate confusing blockmaxsize, fix getmininginfo outputMatt Corallo
* This removes block-size-limiting code in favor of GBT clients doing the limiting themselves (if at all). * -blockmaxsize is deprecated and only used to calculate an implied blockmaxweight, addressing confusion from multiple users. * getmininginfo's currentblocksize return value was returning garbage values, and has been removed, also removing a GetSerializeSize call in some block generation inner loops and potentially addressing some performance edge cases.
2017-09-08Merge #11250: Bump wallet version to 159900 and remove the `usehd` optionWladimir J. van der Laan
713a92073 Remove usehd option and warn when it is used (Andrew Chow) d4c18f733 Bump wallet version number to 159900 (Andrew Chow) Pull request description: Bump the wallet version number to 159900 so that new wallets made without a default key will no longer work on previous versions at all. Also remove the `usehd` option to avoid weird interaction with wallet version numbers and HD-ness of wallets. Tree-SHA512: dd7965505bfad6a926c79afd423236f509229a398a8398076f8d57d90a5974243f9459a61225c4daee560c796f427445c9e55a3ad528a3a97a9123ca6a1269ab
2017-09-07Remove usehd option and warn when it is usedAndrew Chow
Removed the -usehd option so wallets cannot be made to be non-hd anymore. A warning will be displayed when the option is set.
2017-09-07[test] Add bitcoin-cli -stdin and -stdinrpcpass functional testsJoão Barbosa
2017-09-07[test] Replace check_output with low level versionJoão Barbosa
2017-09-07[test] Add assert_raises_process_error to assert process errorsJoão Barbosa
2017-09-07[test] Add support for custom arguments to TestNodeCLIJoão Barbosa
2017-09-07[test] Improve assert_raises_jsonrpc docstringJoão Barbosa
2017-09-07Merge #10838: (finally) remove getinfoWladimir J. van der Laan
aece8a463 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo) Pull request description: I see no reason not to have done this in 0.13, let alone for 0.15. Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
2017-09-06(finally) remove getinfo in favor of more module-specific infosMatt Corallo
2017-09-06Merge #11099: [RPC][mempool]: Add savemempool RPCMarcoFalke
1aa97ee08 Add savemempool RPC (Lawrence Nahum) 467cbbcbf Add return value to DumpMempool (Lawrence Nahum) Pull request description: Adds a simple parameterless rpc command to dump the mempool. Rationale: Sometimes there can be a crash for whatever reason (bug, power loss, etc) causing the mempool.dat file to not be saved. This change allows to script/cron the rpc call to have more regular saves to the file as well as cli/ad-hoc. This should solve issue https://github.com/bitcoin/bitcoin/issues/11086 Tree-SHA512: e856ae9777425a4521279c9b58e69285d8e374790bebefd3284cf91931eac0e456f86224f427a087a01bf70440bf6e439fa02c8a34940eb1046ae473e98b6aaa
2017-09-06Merge #11203: rpc: add wtxid to mempool entry outputWladimir J. van der Laan
617c459c6 qa: rpc test for wtxid in mempool entry (Suhas Daftuar) 7e5d5965d RPC: add wtxid to mempool entry output (Suhas Daftuar) Pull request description: We already cache this information in the mempool, so including it in the output of rpc calls is basically free. Tree-SHA512: 2757e1bfca028103937e4b76ce1a5d805846bad5d3d9dd631dcc5f87721bcc0e9d19e437e02053ef1dd3b38b503f0fca8c0b8492cac37dfbd70256a3665f704c
2017-09-06Merge #11067: [qa] TestNode: Add wait_until_stopped helper methodMarcoFalke
faa8d9581 [qa] TestNode: Add wait_until_stopped helper method (MarcoFalke) Pull request description: This adds a helper method `wait_until_stopped` to the `TestNode` class. This should prevent numerous `time.sleep()` over all places. Additionally, the timeout behavior is restored. (Was removed by the introduction of `TestNode`.) This should prevent tests from running indefinitely by accident. Tree-SHA512: 7133fc64d55711869c4e372e9d30625c98f1237fb3578c24a26900d9319831f10eb95592d7b08e536fa706158dffb0abf9197f11c5d9ef605c880628e1a6533f
2017-09-06Merge #10357: Allow setting nMinimumChainWork on command lineWladimir J. van der Laan
eac64bb7a [qa] Test nMinimumChainWork (Suhas Daftuar) 0311836f6 Allow setting nMinimumChainWork on command line (Suhas Daftuar) Pull request description: As discussed briefly here: https://botbot.me/freenode/bitcoin-core-dev/2017-02-28/?msg=81712308&page=4 This adds a hidden command line option for setting `nMinimumChainWork`, which allows us to test this parameter in our functional tests, as well as allowing for niche use cases like syncing nodes that are otherwise disconnected from the network. See also #10345, which proposes a new use of `nMinimumChainWork`. Tree-SHA512: fe4d8f4f289697615c98d8760f1cc74c076110310ea0b5b875fcab78c127da9195b4eb84148aebacc7606c246e5773d3f13bd5d9559d0a8bffac20a3a28c62df
2017-09-06[qa] TestNode: Add wait_until_stopped helper methodMarcoFalke
2017-09-06Add savemempool RPCLawrence Nahum
2017-09-05[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.
2017-09-05Improve 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.