aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-02-04qa: Test .walletlock file is closedJoão Barbosa
2019-02-02test: Fix race in p2p_invalid_messagesMarcoFalke
2019-02-01Merge #15247: qa: Use wallet to retrieve raw transactionsMarcoFalke
fa5278a419 qa: Use wallet to retrieve raw transactions (MarcoFalke) fa2198328e qa: Style-only fixes in touched files (MarcoFalke) Pull request description: Instead of asking the coin database and block storage about a transaction, pull it directly from the wallet in wallet related tests. This refactoring only makes sense in light of #15159. <sub>This product may contain minor stylistic cleanups Tree-SHA512: ec34c7150d873da9f19fead3f7e3f758baba5ef10061942384c470a47a6f320690109be9c5160f0c8bc228272a729653d44c78471455337318f657d6c164ba23
2019-02-01Merge #15235: Do not import private keys to wallets with private keys disabledWladimir J. van der Laan
e6c58d3b014ab8ef5cca4be68764af4b79685fcb Do not import private keys to wallets with private keys disabled (Andrew Chow) b5c5021b644731d14a6ef04961320a99466f035a Refactor importwallet to extract data from the file and then import (Andrew Chow) 1f77f6754ce724493b0cb084ae0b35107d58605f tests: unify RPC argument to cli argument conversion and handle dicts and lists (Andrew Chow) Pull request description: Fixes a bug where private keys could be imported to wallets with private keys disabled. Now every RPC which can import private keys checks for whether the wallet has private keys are disabled and errors if it is. Also added an belt-and-suspenders check to `AddKeyPubkeyWithDB` to have it assert that the wallet has private keys enabled. Tree-SHA512: 5cd04febce9aa2bd9bfd02f312c6ff8705e37278cae59efd3895f6d6e2f1b477aefd297e2dd0860791bdd3d4f3cad8eb1a404f8f3d4e2035b91314ad2c1028ae
2019-01-31Do not import private keys to wallets with private keys disabledAndrew Chow
2019-01-31tests: unify RPC argument to cli argument conversion and handle dicts and listsAndrew Chow
When running tests with --usecli, unify the conversion from argument objects to strings using a new function arg_to_cli(). This fixes boolean arguments when using named arguments. Also use json.dumps() to get the string values for arguments that are dicts and lists so that bitcoind's JSON parser does not become confused.
2019-01-31Merge #13926: [Tools] bitcoin-wallet - a tool for creating and managing ↵MarcoFalke
wallets offline 3c3e31c3a4 [tests] Add wallet-tool test (João Barbosa) 49d2374acf [tools] Add wallet inspection and modification tool (Jonas Schnelli) Pull request description: Adds an offline tool `bitcoin-wallet-tool` for wallet creation and maintenance. Currently this tool can create a new wallet file, display information on an existing wallet, and run the salvage and zapwallettxes maintenance tasks on an existing wallet. It can later be extended to support other common wallet maintenance tasks. Doing wallet maintenance tasks in an offline tool makes much more sense (and is potentially safer) than having to spin up a full node. Tree-SHA512: 75a28b8a58858d9d76c7532db40eacdefc5714ea5aab536fb1dc9756e2f7d750d69d68d59c50a68e633ce38fb5b8c3e3d4880db30fe01561e07ce58d42bceb2b
2019-01-31Merge #15244: gdb attaching to process during tests has non-sudo solutionWladimir J. van der Laan
f96dbd1bbeeea82f07bc71c695fb17e8d7c9f1aa gdb attaching to process during tests has non-sudo solution (Gregory Sanders) Pull request description: There are some security considerations, so a link is attached. Tree-SHA512: 67dd9c4b26b1e6d8e9a9fe766d309c0af69b752f6f544f3dce4bdcc95ae85feb9a49ac600c3f70d100629505d2340ab43932ded53b1485f80b97981e6df6a527
2019-01-31Merge #15246: qa: Add tests for invalid message headersWladimir J. van der Laan
fa3745bda84d5b3a26fdf8af4ac44d6088e11eee qa: Add tests for invalid message headers (MarcoFalke) Pull request description: Tree-SHA512: b37e297cfd65a33a7af201f750a303cf437b438e40d38b1d2f562ccde67082616daa110ca1e5e3af6514ea4ca4b115362acf2ffa6263cea3c8e8189ce02dda67
2019-01-31gdb attaching to process during tests has non-sudo solutionGregory Sanders
2019-01-30[tests] Add wallet-tool testJoão Barbosa
Original tests by João Barbosa <joao.paulo.barbosa@gmail.com> Additional contribution by John Newbery <john@johnnewbery.com>
2019-01-30Merge #15163: Correct units for "-dbcache" and "-prune"Wladimir J. van der Laan
6f6514a08090b37b5e8c086015ee4881813ef867 Correct units for "-dbcache" and "-prune" (Hennadii Stepanov) Pull request description: Actually, all `dbcache`-related values in the code are measured in MiB (not in megabytes, MB) or in bytes (e.g., `nTotalCache`). See: https://github.com/bitcoin/bitcoin/blob/master/src/txdb.h https://github.com/bitcoin/bitcoin/blob/ba8c8b22272ad40fe2de465d7e745532bab48d3b/src/init.cpp#L1405-L1424 Also, "-prune" is fixed: 1. The GUI values in GB are translated to the node values in MiB correctly. 2. The maximum of the "prune" `QSpinBox` is not limited by default value of 99 (GB). Fix: #15106 Tree-SHA512: 151ec43b31b1074db8b345fedb1dcc10bde225899a5296bfc183f57e1553d13ac27db8db100226646769ad03c9fcab29d88763065a471757c6c41ac51108459d
2019-01-30Merge #15159: [RPC] Remove lookup to UTXO set from GetTransactionMarcoFalke
04da9f4834 [RPC] Update getrawtransaction interface (Amiti Uttarwar) Pull request description: - stop checking unspent UTXOs for a transaction when txindex is not enabled, as per conversation here: https://github.com/bitcoin/bitcoin/issues/3220#issuecomment-377458383 - code contributed by sipa Tree-SHA512: aa07353bccc14b81b7803992a25d076d6bc06d15ec7c1b85828dc10aea7e0498d9b49f71783e352ab8a14b0bb2010cfb7835de3dfd1bc6f2323f460449348e66
2019-01-30Correct units for "-dbcache" and "-prune"Hennadii Stepanov
All dbcache-related values in the code are measured in MiB (not in megabytes, MB) or in bytes. The GUI "-prune" values in GB are translated to the node values in MiB correctly. The maximum of the "-prune" QSpinBox is not limited by the default value of 99 (GB). Also, this improves log readability.
2019-01-26qa: Use wallet to retrieve raw transactionsMarcoFalke
2019-01-26[RPC] Update getrawtransaction interfaceAmiti Uttarwar
2019-01-25qa: Style-only fixes in touched filesMarcoFalke
2019-01-24Docs: Update python docs to reflect that wildcard imports are disallowedBen Woosley
2019-01-24qa: Add tests for invalid message headersMarcoFalke
2019-01-24tests: unify RPC argument to cli argument conversion and handle dicts and listsAndrew Chow
When running tests with --usecli, unify the conversion from argument objects to strings using a new function arg_to_cli(). This fixes boolean arguments when using named arguments. Also use json.dumps() to get the string values for arguments that are dicts and lists so that bitcoind's JSON parser does not become confused.
2019-01-24Merge #15193: Default -whitelistforcerelay to offWladimir J. van der Laan
a36d97d866e8a11f205d07c624ace7c3d1a2ded8 Default -whitelistforcerelay to off (Suhas Daftuar) Pull request description: No one seems to use this "feature", and at any rate the behavior of relaying transactions when they violate local policy is error-prone, if we ever consider changing the ban behavior of our software from one version to the next. Defaulting this to off means that users who use -whitelist won't be unexpectedly surprised by this interaction. If anyone is still relying on this feature, it can still be explicitly turned on. Tree-SHA512: 52650ad464a728d1648f496751e3f713077ea3a1de7278ed03531b2e8723e63cf2f6f41b56c98c0f73ffa22c36e01d9170b409ab452c737aca35b7ecd7a6b448
2019-01-23Merge #15196: [test]: Update all subprocess.check_output functions to be ↵Jonas Schnelli
Python 3.4 compatible fdf82ba18 Update all subprocess.check_output functions in CI scripts to be Python 3.4 compatible (Graham Krizek) Pull request description: CI is failing the `lint` stage on every Cron run (regular PR/Push runs still pass). The failure was introduced in 74ce326 and has been broken since. The Python version running in CI was downgraded to 3.4 from 3.6. There were a couple files that were using the `encoding` argument in the `subprocess.check_output` function. This was introduced in Python 3.6 and therefore broke the scripts that were using it. The `universal_newlines` argument was used as well, but in order to use it we must be able to set encoding because of issues on some BSD systems. To get CI to pass, I removed all `universal_newline` and `encoding` args to the `check_ouput` function. Then I decoded all `check_output` return values. This should keep the same behavior but be Python 3.4 compatible. Tree-SHA512: f5e5885e98cf4777be9cc254446a873eedb03bdccbd8e06772a964db95e9fcf46736aa9cdcab1d8f123ea9f4947ed6020679898d8b2f47ffb1d94c21a4b08209
2019-01-22Merge #14353: REST: add blockhash call, fetch blockhash by heightJonas Schnelli
42ff30ec6 [Docs] add short documentation for /rest/blockhashbyheight (Jonas Schnelli) 579d418f7 [QA] add rest tests for /rest/blockhashbyheight/<HEIGHT>.<FORMAT> (Jonas Schnelli) eb9ef04c4 REST: add "blockhashbyheight" call, fetch blockhash by height (Jonas Schnelli) Pull request description: Completes the REST interface for trivial block exploring by adding a call that allows to fetch the blockhash in the main chain by a given height. Tree-SHA512: 94be9e56718f857279b11cc16dfa8d04f3b5a762e87ae54281b4d87247c71c844895f4944d5a47f09056bf851f4c4761ac4fbdbaaee957265d14de5c1c73e8d2
2019-01-22Default -whitelistforcerelay to offSuhas Daftuar
2019-01-21[QA] add rest tests for /rest/blockhashbyheight/<HEIGHT>.<FORMAT>Jonas Schnelli
2019-01-21Merge #15219: lint: Enable python linters via an arrayWladimir J. van der Laan
948d8f4f10c31220ba4b6779cc862e2b6a0af5f6 lint: Enable python linters via an array (Ben Woosley) Pull request description: This assures consistent recording of the enabled linters. This applies the same fix as #15170 to lint-python.sh Tree-SHA512: 6d03f919e86e7c2465475c88b25dd84391282bcc11728078024daf0432a7dccddf9e4a2cdae35d6ef374971cb4e12f0fa21b58f757e25f2fe7c12ceb4f4b2c57
2019-01-21Merge #15177: rest: Improve tests and documention of /headers and /blockWladimir J. van der Laan
7cf994d5cfd53dcff76ebd0e0007e3477a7570e8 qa: Improve tests of /rest/headers and /rest/block (João Barbosa) 0825b86b280c684c32c60bac9e862298c7279f27 doc: /rest/block responds with 404 if block does not exist (João Barbosa) be625f7c5562afed517ff51d2d85268ba5ce6017 doc: Explain empty result of /rest/headers (João Barbosa) Pull request description: Follow up of #15107. Tree-SHA512: a7fdeed05216e3eda9604664db529237c2d0ddf422cfac139d6345a22b6e00bfe870d4e3f177423db7d4efb295ac2dc0ca2eb20c9c27c0719b89fd5428860d03
2019-01-20lint: Enable python linters via an arrayBen Woosley
This assures consistent recording of the enabled linters.
2019-01-18Update all subprocess.check_output functions in CI scripts to be Python 3.4 ↵Graham Krizek
compatible Removing the 'universal_newlines' and 'encoding' args from the subprocess.check_outputs fuction. 'universal_newlines' is supported in 3.4, but 'encoding' is not. Without specifying 'encoding' it will make a guess at encoding, which can break things on BSD systems. We must handle encoding/decoding ourselves until we can use Python 3.6
2019-01-16Remove no longer needed shellcheck suppressionspracticalswift
2019-01-16Fix warnings introduced in shellcheck v0.6.0practicalswift
2019-01-16Remove repeated suppression. Fix indentation.practicalswift
2019-01-16qa: Improve tests of /rest/headers and /rest/blockJoão Barbosa
2019-01-16Merge #14409: utils and libraries: Make 'blocksdir' always net specificWladimir J. van der Laan
e4a0c3547ed886871f8b3d51c6b4ffdb181a8b9c Improve blocksdir functional test. (Hennadii Stepanov) c3f1821ac788e522e7558e3575150433450dcb8c Make blockdir always net specific (Hennadii Stepanov) Pull request description: The blocks directory is net specific by definition. Also this prevents the side effect of calling `GetBlocksDir(false)` in the non-mainnet environment. Currently a new node creates an unused `blocks\` directory in the root of the data directory when `-testnet` or `-regtest` is specified. Refs: - #12653 - https://github.com/bitcoin/bitcoin/pull/12653#discussion_r174784834 by @laanwj - https://github.com/bitcoin/bitcoin/issues/14595#issuecomment-436011186 Tree-SHA512: c9957a68a4a200ebd2010823a56db7e61563afedcb7c9828e86b13f3af2990e07854b622c1f3374756f94574acb3ea32de7d2a399eef6c0623f0e11265155627
2019-01-16Merge #14958: qa: Remove race between connecting and shutdown on separate ↵Wladimir J. van der Laan
connections 4412a59bfe8228698e5b5bbe8bb21c8e8a70d357 qa: Remove race between connecting and shutdown on separate connections (João Barbosa) Pull request description: Fixes the error https://github.com/bitcoin/bitcoin/pull/14670#issuecomment-447255352 reported by @ken2812221. There is a race between RPC stop and another concurrent call in the test framework. The connection must be established and the command `waitfornewblock` running before calling `stop`. See also https://github.com/bitcoin/bitcoin/pull/14670#issuecomment-447304513. Tree-SHA512: 77feb8628d3b9c025ec0cf83565d4d6680cad4fb182fc93a65df8b573f3e799ba4c44e06d9001dd8a375ca0b1ee17f10e66c3902b6256d0ae2acbc64539185d7
2019-01-16qa: Remove race between connecting and shutdown on separate connectionsJoão Barbosa
2019-01-16Merge #15170: refactor/lint: Add ignored shellcheck suggestions to an arrayWladimir J. van der Laan
cbd9091ed5a76bb2e1e57cd0d8db035c15529341 refactor/lint: Add ignored suggestions to an array (Vidar Holen) Pull request description: By adding excluded shellcheck suggestions to an array, you can avoid the current duplication between command and comments. This ensures that they never go out of sync, makes it easier to add new ones, and improves the readability of related diffs. Tree-SHA512: 04afced1d27fda940cc5e61d7f9ed04507c8f7f7dfd0031c09898a599c6de93695923a80cb3d515a0f0bf728847592d8680c15ac2e376b48726c03ca744f13a5
2019-01-15[doc] explain what .python-version doesSjors Provoost
2019-01-14refactor/lint: Add ignored suggestions to an arrayVidar Holen
This avoids duplicating the codes between command and comments.
2019-01-14Merge #14982: rpc: Add getrpcinfo commandWladimir J. van der Laan
a0ac15459a0df598e1ee1fd36a3899a129cecaeb doc: Add getrpcinfo release notes (João Barbosa) 251a91c1bf245b3674c2612149382a0f1e18dc98 qa: Add tests for getrpcinfo (João Barbosa) d0730f5ce475e5a84da7c61fe79bcd6ed24d693e rpc: Add getrpcinfo command (João Barbosa) 068a8fc05f8dbec198bdc3fe46f955d8a5255303 rpc: Track active commands (João Barbosa) bf4383277d6761cc5b7a91975752c08df829af72 rpc: Remove unused PreCommand signal (João Barbosa) Pull request description: The new `getrpcinfo` command exposes details of the RPC interface. The details can be configuration properties or runtime values/stats. This can be particular useful to coordinate concurrent functional tests (see #14958 from where this was extracted). Tree-SHA512: 7292cb6087f4c429973d991aa2b53ffa1327d5a213df7d6ba5fc69b01b2e1a411f6d1609fed9234896293317dab05f65064da48b8f2b4a998eba532591d31882
2019-01-14qa: Ignore shellcheck warning SC2236João Barbosa
With shellcheck 0.6.0 the warning `SC2236 - Use -n instead of ! -z` is raised. This change adds that warning to the ignored list.
2019-01-10Merge #15039: wallet: Avoid leaking nLockTime fingerprint when anti-fee-snipingWladimir J. van der Laan
fa48baf23eb2ec5e9b71e3e07c24432fc1fed39c wallet: Avoid leaking locktime fingerprint when anti-fee-sniping (MarcoFalke) 453803adc9325b83fc0532a8328d455e8bdf4de6 [test] wallet_txn_clone: Correctly clone txin sequence (MarcoFalke) Pull request description: The wallet sets the locktime to the current height of our active chain. This is fine, as long as our node is connected to other nodes. However, when we fall back and get stuck at a particular height (e.g. taking the wallet offline), the same (potentially unique) locktime is used for all transactions. This makes it easier for passive observers to cluster transactions by wallet. For reference, I visualized "locktime-reuse" with the data: * blocks 545k-555k (both inclusive) * locktimes<=60k * excluding coinbase txs ![distribution of height-based tx locktimes used at least twice](https://user-images.githubusercontent.com/6399679/50446163-b8256d80-0913-11e9-9832-40b76052b2b9.png) Tree-SHA512: 2af259dd8f9f863312e2732d80ca8ba6a20c8d6d1c486b10a48479e1c85ccf13b0c38723740ebadde0f28d321cd9c133ad3e5d1e925472eb27681143bda2d0e7
2019-01-09Merge #15127: docs: Clarifying testing instructionsMarcoFalke
ef5ebc6d8f docs: Clarifying testing instructions (benthecarman) Pull request description: This statement confused me on my first time reading through. Hopefully, this addition will help someone else on their first time. Tree-SHA512: 17f421275adb7586eca954910269d29fcd3bacc42fab4bc2e01110f9e13ca6f8c1ca178246f7192e1131f14ced7f7dc0b57e7aec324898807c1813a2ebc513de
2019-01-09Merge #15108: [tests] tidy up wallet_importmulti.pyMarcoFalke
2d5f1ea2e3 [tests] move wallet util functions to wallet_util.py (John Newbery) 6be64ef02c [tests] tidy up wallet_importmulti.py (John Newbery) Pull request description: Cherry picks un-merged commits from #14952, which "fixes review comments from @ryanofsky here: https://github.com/bitcoin/bitcoin/pull/14886#pullrequestreview-183772779" Tree-SHA512: 5f389196b0140d013a533d500f1812786a3a5cfb65980e13eaeacc459fddb55f43d05da3ab5e7cc8c997f26c0b667eed081ab6de2d125e631c70a7dd4c06e350
2019-01-09Merge #14599: Use functions guaranteed to be locale independent (IsDigit, ↵Wladimir J. van der Laan
ToLower) in {Format,Parse}Money(...), uint256::SetHex(...), etc. Remove the use of locale dependent boost::is_space(...) 8931a95beca2b959c7ee73b154ce8a69acbe8599 Include util/strencodings.h which is required for IsSpace(...) (practicalswift) 7c9f7907615ff9c10a56ede5a8e47c91cb20fe3b Update KNOWN_VIOLATIONS: Remove fixed violations (practicalswift) 587924f0006d2eb9b8218b6abffe181bb9c27513 Use IsSpace(...) instead of boost::is_space (practicalswift) c5fd143edb85d0c181e21a429f9e29d12a611831 Use ToLower(...) instead of std::tolower (practicalswift) e70cc8983c570bbacee37a67df86b1bf959894df Use IsDigit(...) instead of std::isdigit (practicalswift) Pull request description: * Use `ToLower(...)` instead of `std::tolower`. `std::tolower` is locale dependent. * Use `IsDigit(...)` instead of `std::isdigit`. Some implementations (e.g. Microsoft in 1252 codepage) may classify single-byte characters other than `[0-9]` as digits. * Update `KNOWN_VIOLATIONS`: Remove fixed violations. * ~~Replace use of locale dependent Boost trim (`boost::trim`) with locale independent `TrimString`.~~ * Use` IsSpace(...)` instead of `boost::is_space` Tree-SHA512: defed016136b530b723fa185afdbd00410925a748856ba3afa4cee60f61a67617e30f304f2b9991a67b5fe075d9624f051e14342aee176f45fbc024d59e1aa82
2019-01-09docs: Clarifying testing instructionsbenthecarman
2019-01-09Merge #15087: Error if rpcpassword contains hash in conf sectionsWladimir J. van der Laan
8cff83124bcac936ecc6add6dca72b125a79a08f Error if rpcpassword contains hash in conf sections (MeshCollider) Pull request description: Fixes #15075 Tree-SHA512: 08ba2a2e9a7ea228fc0e0ff9aa76da1fecbe079e3b388304a28b6399e338a4b3a38b03ab03aca880e75f14a8d2ba75ceb31a385d7989cd66db5193a79f32c4e5
2019-01-09Error if rpcpassword contains hash in conf sectionsMeshCollider
2019-01-08Merge #15059: test: Add basic test for BIP34Wladimir J. van der Laan
fab17e8272f5f70213f186809479ee7a75898b1d test: Add basic test for BIP34 (MarcoFalke) Pull request description: BIP34 was disabled for testing, which explains why it had no test. Fix that by enabling it and adding a test. Tree-SHA512: 9cb5702d474117ce6420226eb93ee09d6fb5fc856fabc8b67abe56a088cd727674e0e5462000e1afa83b911374036f90abdbdde56a8c236a75572ed47e10a00f
2019-01-07Merge #15057: [rpc] Correct reconsiderblock help text, add testWladimir J. van der Laan
fa38d3df69851212fea7544badadc1c3e5369bf5 [rpc] Correct reconsiderblock help text, add test (MarcoFalke) Pull request description: Rework documentation and test to match the implementation Tree-SHA512: d0adef6b054a341bcc1cb87783a4e4cf9be124ba6812e1ac88246a5e01b2861a8071b12dba880b2b428c37da3fa860bfec3fe3e5fbb7c28696872113faa84a9f