aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-03-07Merge #11687: External wallet filesWladimir J. van der Laan
be8ab7d08 Create new wallet databases as directories rather than files (Russell Yanofsky) 26c06f24e Allow wallet files not in -walletdir directory (Russell Yanofsky) d8a99f65e Allow wallet files in multiple directories (Russell Yanofsky) Pull request description: This change consists of three commits: * The first commit is a pure refactoring that removes the restriction that two wallets can only be opened at the same time if they are contained in the same directory. * The second commit removes the restriction that `-wallet` filenames can only refer to files in the `-walletdir` directory. * The third commit makes second commit a little safer by changing bitcoin to create wallet databases as directories rather than files, so they can be safely backed up. All three commits should be straightforward: * The first commit adds around 20 lines of new code and then updates a bunch of function signatures (generally updating them to take plain fs::path parameters, instead of combinations of strings, fs::paths, and objects like CDBEnv and CWalletDBWrapper). * The second commit removes two `-wallet` filename checks and adds some test cases to the multiwallet unit test. * The third commit just changes the mapping from specified wallet paths to bdb environment & data paths. --- **Note:** For anybody looking at this PR for the first time, I think you can skip the comments before _20 Nov_ and start reading at https://github.com/bitcoin/bitcoin/pull/11687#issuecomment-345625565. Comments before _20 Nov_ were about an earlier version of the PR that didn't include the third commit, and then confusion from not seeing the first commit. Tree-SHA512: 00bbb120fe0df847cf57014f75f1f7f1f58b0b62fa0b3adab4560163ebdfe06ccdfff33b4231693f03c5dc23601cb41954a07bcea9a4919c8d42f7d62bcf6024
2018-03-07Merge #12627: qa: Fix some tests to work on native windowsMarcoFalke
fa3528a85b qa: Fix some tests to work on native windows (MarcoFalke) Pull request description: This allows some more tests to be run natively on Windows Tree-SHA512: 8097a82dc046be9f6bb0da634758c9afef7836960ca7a1f88f9acab9512dbf7bc26525b515faae407edab4620846cce2b427940298f822e250f23f924b4c7591
2018-03-07Merge #9991: listreceivedbyaddress Filter AddressWladimir J. van der Laan
f08761371 Add tests of listreceivedbyaddress address filtering (Jeremy Rubin) 8ee08120d Add address filtering to listreceivedbyaddress (Jeremy Rubin) Pull request description: Supersede https://github.com/bitcoin/bitcoin/pull/9503 created by @JeremyRubin , I will maintain it. Tree-SHA512: 2accaed493b7e1c2eb5cb5270180f100f8c718b6585b9574f294191c318dc622a79e42ac185300f291f82d3b2a6f1c00850b6b17e4ff2dbab94d71df695acbfe
2018-03-07Merge #12482: [tests] bind functional test nodes to 127.0.0.1Wladimir J. van der Laan
b156ff7c3 [tests] bind functional test nodes to 127.0.0.1 (Sjors Provoost) Pull request description: Replaces #12200 which broke `rpc_bind.py`. Prevents OSX firewall allow-this-application-to-accept-inbound-connections permission popups and is generally safer. To prevent binding to `127.0.0.1`, set `self.bind_to_localhost_only = False`. cc @jnewbery Tree-SHA512: 5e700124c91bd0cbdee83ca44910071d71d61d8842334755b685d14fbff6454d75de1ea7de67340370386f58b41361e80e90bb4dca5c4d5992f9d2b27985f999
2018-03-07Add tests of listreceivedbyaddress address filteringJeremy Rubin
2018-03-06qa: Fix some tests to work on native windowsMarcoFalke
2018-03-06[tests] bind functional test nodes to 127.0.0.1Sjors Provoost
Prevents OSX firewall allow-this-application-to-accept-inbound-connections permission popups and is generally safer. To prevent binding to 127.0.0.1, set self.bind_to_localhost_only = False.
2018-03-06Merge #12479: RPC: Add child transactions to getrawmempool verbose outputWladimir J. van der Laan
1dfb4e7d7 [Tests] Check output of parent/child tx list from getrawmempool, getmempooldescendants, getmempoolancestors, and REST interface (Conor Scott) fc44cb108 [RPC] Add list of child transactions to verbose output of getrawmempool (Conor Scott) Pull request description: `bitcoin-cli getrawmempool true` only lists a transaction's parents in the `depends` field. This change adds a `spentby` field to the json response, which lists the transaction's children in the mempool. Currently the only way to find child transactions is to use `getrawmempool` or make another call to `getmempooldescendants` and search the response for transactions that list the parent_txid in the `depends` list, which is inefficient. This change allows direct lookup of children. Example Output ``` "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4": { ...other geterawmempool data... "wtxid": "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4", "depends": [ "bdd92851d5766a42aeb62af667bb422a116cab4e032bba5e3dd6efe5b4b40aa0" ], "spentby": [ "dc5d3ec388a9121421208738a041ac30a22163bc2e17758f2275b6c51a15ba7b" ] }, ``` Tree-SHA512: 83da7d421c9799a40ef65af3b7fdb586d6d87385f3f2ede3afd2c311725444b858f9d91cc110422a0fa31905779934fee07211ca6fe6b746792b83692c94b3ce
2018-03-05Merge #12512: Don't test against the mempool min fee information in ↵Wladimir J. van der Laan
mempool_limit.py 55f89da1a Don't test against the mempool min fee information in mempool_limit.py (Ben Woosley) Pull request description: Because the right-hand side of this comparison can be influenced externally, e.g. via the -maxmempool argument, the existing mempool state, host memory usage, etc. Called out by @MarcoFalke here: https://github.com/bitcoin/bitcoin/pull/12356#discussion_r170094948 Tree-SHA512: 1644cb8046a6953fb93423a5e51af4f5c7d00a35f10389fddd6a823dae6f31ab367b53af70b3b69161adb9c48f57cf4772db7f4610fd7aadd9c0e9b3da17e9f8
2018-03-05Merge #12475: qa: Fix python TypeError in script.pyWladimir J. van der Laan
fa41d68a2 qa: Fix python TypeError in script.py (MarcoFalke) Pull request description: `__repr__` returns string, so don't mix it with byte strings. This fixes ``` TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' Tree-SHA512: fac06e083f245209bc8a36102217580b0f6186842f4e52a686225111b0b96ff93c301640ff5e7ddef6a5b4f1689071b16a9a8dc80f28e2b060ddee29edd24ec7
2018-03-05Merge #12543: Fix typosMarcoFalke
d918eb7864 Fix typos (practicalswift) Pull request description: Fix typos. Tree-SHA512: c790e49be6e01c8d70ebd872ef61cc210c1de15c4a1e5a98280169f32dc8a14cd68f4dd1c23afc76758b28ef355ab12ded2ff7504562dc9b69a11839ad3cd7e3
2018-03-03Create new wallet databases as directories rather than filesRussell Yanofsky
This change should make it easier for users to make complete backups of wallets because they can now just back up the specified `-wallet=<path>` path directly, instead of having to back up the specified path as well as the transaction log directory (for incompletely flushed wallets). Another advantage of this change is that if two wallets are located in the same directory, they will now use their own BerkeleyDB environments instead using a shared environment. Using a shared environment makes it difficult to manage and back up wallets separately because transaction log files will contain a mix of data from all wallets in the environment.
2018-03-03Allow wallet files not in -walletdir directoryRussell Yanofsky
Remove restriction that -wallet filenames can only refer to files in the -walletdir directory.
2018-03-01Merge #11882: Disable default fallbackfee on mainnetWladimir J. van der Laan
3f592b8 [QA] add wallet-rbf test (Jonas Schnelli) 8222e05 Disable wallet fallbackfee by default on mainnet (Jonas Schnelli) Pull request description: Removes the default fallback fee on mainnet (but keeps it on testnet/regtest). Transactions using the fallbackfee in case the fallback fee has not been set are getting rejected. Tree-SHA512: e54d2594b7f954e640cc513a18b0bfbe189f15e15bdeed4fe02b7677f939bca1731fef781b073127ffd4ce08a595fb118259b8826cdaa077ff7d5ae9495810db
2018-03-01Merge #10387: Eventually connect to NODE_NETWORK_LIMITED peersWladimir J. van der Laan
eb91835 Add setter for g_initial_block_download_completed (Jonas Schnelli) 3f56df5 [QA] add NODE_NETWORK_LIMITED address relay and sync test (Jonas Schnelli) 158e1a6 [QA] fix mininode CAddress ser/deser (Jonas Schnelli) fa999af [QA] Allow addrman loopback tests (add debug option -addrmantest) (Jonas Schnelli) 6fe57bd Connect to peers signaling NODE_NETWORK_LIMITED when out-of-IBD (Jonas Schnelli) 31c45a9 Accept addresses with NODE_NETWORK_LIMITED flag (Jonas Schnelli) Pull request description: Eventually connect to peers signalling NODE_NETWORK_LIMITED if we are out of IBD. Accept and relay NODE_NETWORK_LIMITED peers in addrman. Tree-SHA512: 8a238fc97f767f81cae1866d6cc061390f23a72af4a711d2f7158c77f876017986abb371d213d1c84019eef7be4ca951e8e6f83fda36769c4e1a1d763f787037
2018-02-26Fix typospracticalswift
2018-02-26Merge #12083: Improve getchaintxstats test coverageWladimir J. van der Laan
57e6786 qa: Improve getchaintxstats functional test (João Barbosa) 501b439 rpc: Refactor blockhash parse in getchaintxstats (João Barbosa) Pull request description: Tree-SHA512: 61dec5cb68122998df7ec7b5239830f3caf0fe7185c107a66f27653ab2531a800db19a09050671b6fa8dbb5b53181da861eb31199c79d8635f246ccfa0d10efd
2018-02-25[Tests] Check output of parent/child tx list from getrawmempool, ↵Conor Scott
getmempooldescendants, getmempoolancestors, and REST interface
2018-02-25[QA] add wallet-rbf testJonas Schnelli
2018-02-23Merge #12443: qa: Move common args to bitcoin.confMarcoFalke
face7220b7 qa: Move common args to bitcoin.conf (MarcoFalke) Pull request description: Beside removing duplicates of the same args in the code, this actually helps with debugging after a test failure. For example, `bitcoin-qt` has `server` turned off, so you'd have to turn it on every time, if you wanted to debug a temporary test datadir created by the test framework. Also, `keypool` would fill up if you forget to specify `-keypool=1`. Tree-SHA512: 996bec8738dc0fce7297ab1fc5b4fbe3aa31b9b6241f8c4e685db728925363ccaca6145ad1edc6bee2f360e02ac4b9a53fcdff74eb79de90793393742d52b559
2018-02-23Merge #12486: [test] Round target fee to 8 decimals in assert_fee_amountWladimir J. van der Laan
42e1b5d [test] Round target fee to 8 decimals in assert_fee_amount (Karl-Johan Alm) Pull request description: The output would produce arbitrary number of decimal points, sometimes resulting in 9 decimals: ``` AssertionError: Fee of 0.00000415 BTC too low! (Should be 0.000006175 BTC) ``` The above looks like the expected fee is 6175 sats when in reality it's 618. Tree-SHA512: ddbff2926a88890d6e34a58db36f0b15a917a80064be6e40e9bcbec3f05ae6202d02adcd7873733945b043fa121d4a56dd930446ec368078fe1935cbfff898ce
2018-02-22Don't test against the mempool min fee information in mempool_limit.pyBen Woosley
Because the right-hand side of this comparison can be influenced externally, e.g. via the -maxmempool argument, the existing mempool state, host memory usage, etc.
2018-02-20[test] Round target fee to 8 decimals in assert_fee_amountKarl-Johan Alm
The output would produce arbitrary number of decimal points, sometimes resulting in 9 decimals: AssertionError: Fee of 0.00000415 BTC too low! (Should be 0.000006175 BTC) The above looks like the expected fee is 6175 sats when in reality it's 618.
2018-02-18qa: Fix python TypeError in script.pyMarcoFalke
2018-02-17Add test for signrawtransactionAndrew Chow
Add a brief test for signrawtransaction to ensure that compatibility is maintained.
2018-02-17scripted-diff: change signrawtransaction to signrawtransactionwithwallet in ↵Andrew Chow
tests -BEGIN VERIFY SCRIPT- sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/*.py sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/test_framework/*.py -END VERIFY SCRIPT-
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-02-17Merge #10583: [RPC] Split part of validateaddress into getaddressinfoJonas Schnelli
b22cce014 scripted-diff: validateaddress to getaddressinfo in tests (Andrew Chow) b98bfc5ed Create getaddressinfo RPC and deprecate parts of validateaddress (Andrew Chow) 1598f3230 [rpc] Move DescribeAddressVisitor to rpc/util (John Newbery) 39633ecd5 [rpc] split wallet and non-wallet parts of DescribeAddressVisitor (John Newbery) Pull request description: This PR makes a new RPC command called `getaddressinfo` which relies on the wallet. It contains all of `validateaddress`'s address info stuff. Those parts in `validateaddress` have been marked as deprecated. The tests have been updated to use `getaddressinfo` except the `disablewallet` test which is the only test that actually uses `validateaddress` to validate an address. Tree-SHA512: ce00ed0f2416200b8de1e0a75e8517c024be0b6153457d302c3879b3491cce28191e7c29aed08ec7d2eeeadc62918f5c43a7cb79cd2e4b6d9291bd83ec31c852
2018-02-16Merge #12455: Fix bip68 sequence test to reflect updated rpc error messageMarcoFalke
e710387ca9 test: Fix bip68 sequence test to reflect updated rpc error message (Ben Woosley) Pull request description: The message changed in #12356, but this test is in the extended test suite, so it didn't fail on CI. Tree-SHA512: ce800e2636ab7bbba7876aa533e1684e75c37a7d2a119f9c4602fd89ac9215e2e28710a1f27feb642b6737ed858da049ebc52fdd476ff4637e3ac3bb1d8399ce
2018-02-16Revert "[tests] bind functional test nodes to 127.0.0.1"John Newbery
This reverts commit 65682da7e57af544abb46a7d8a7f4fdca0c73f56.
2018-02-16test: Fix bip68 sequence test to reflect updated rpc error messageBen Woosley
The message changed in #12356
2018-02-16scripted-diff: validateaddress to getaddressinfo in testsAndrew Chow
Change all instances of validateaddress to getaddressinfo since it seems that no test actually uses validateaddress for actually validating addresses. -BEGIN VERIFY SCRIPT- find ./test/functional -path '*py' -not -path ./test/functional/wallet_disable.py -not -path ./test/functional/rpc_deprecated.py -not -path ./test/functional/wallet_address_types.py -exec sed -i'' -e 's/validateaddress/getaddressinfo/g' {} \; -END VERIFY SCRIPT-
2018-02-16Create getaddressinfo RPC and deprecate parts of validateaddressAndrew Chow
Moves the parts of validateaddress which require the wallet into getaddressinfo which is part of the wallet RPCs. Mark those parts of validateaddress which require the wallet as deprecated. Validateaddress will call getaddressinfo for the data that both share for right now. Moves IsMine functions to libbitcoin_common and then links libbitcoin_wallet before libbitcoin_common in order to prevent linker errors since IsMine is no longer used in libbitcoin_server.
2018-02-15qa: Improve getchaintxstats functional testJoão Barbosa
2018-02-15qa: Move common args to bitcoin.confMarcoFalke
2018-02-15Merge #12200: Bind functional test nodes to 127.0.0.1Wladimir J. van der Laan
65682da [tests] bind functional test nodes to 127.0.0.1 (Sjors Provoost) Pull request description: Prevents OSX firewall allow-this-application-to-accept-inbound-connections permission popups and is generally safer. To test, make an arbitrary whitespace change to `src/bitcoind.cpp` and recompile. This normally resets the firewall's memory. Easiest way to reproduce a popup without running the test suite: ```sh src/bitcoind -regtest -bind=127.0.0.1 # No popup src/bitcoind -regtest # Popup ``` Tree-SHA512: ffa92f148a2ead2ceca978c285882979639be23eb31ad6a27aa81df9fdddba5d493719c92c09a351a81d638f6f739c351a721e42168d77ead60abe074df773d6
2018-02-15Merge #12356: Fix 'mempool min fee not met' debug outputWladimir J. van der Laan
bb00c95 Consistently use FormatStateMessage in RPC error output (Ben Woosley) 8b8a1c4 Add test for 'mempool min fee not met' rpc error (Ben Woosley) c04e0f6 Fix 'mempool min fee not met' debug output (Ben Woosley) Pull request description: Output the value that is tested, rather than the unmodified fee value. Prompted by looking into: #11955 Tree-SHA512: fc0bad47d4af375d208f657a6ccbad6ef7f4e2989ae2ce1171226c22fa92847494a2c55cca687bd5a1548663ed3313569bcc31c00d53c0c193a1b865dd8a7657
2018-02-15Fix typo in test_runner.py causing errorMeshCollider
2018-02-14Merge #12409: rpc: Reject deprecated reserveChangeKey in fundrawtransactionWladimir J. van der Laan
fa5f518 rpc: Reject deprecated reserveChangeKey in fundrawtransaction (MarcoFalke) Pull request description: Tree-SHA512: 8506d1494b13c4582b1379e3b8c3906016f1980ebe847727a43a90e7bb9f71b896a1792bc97a8dc7320ccce0534050eb04f92a6f82f811d08efa74a98b3e43f0
2018-02-13Merge #11771: [tests] Change invalidtxrequest to use BitcoinTestFrameworkWladimir J. van der Laan
95e2e9a [tests] Change invalidtxrequest to use BitcoinTestFramework (John Newbery) 359d067 [tests] Fix flake8 warnings in invalidtxrequest (John Newbery) c32cf9f [tests] Add P2PDataStore class (John Newbery) cc046f6 [tests] Reduce NodeConn connection logging from info to debug (John Newbery) Pull request description: Next step in #10603 - first commit changes log level for an internal log from INFO to DEBUG. (Not really related, but I started finding the INFO level logging annoying when debuging test failures) - second commit introduces a `P2PStub` class - a subclass of `NodeConnCB` which has its own block and tx store and responds appropriately to getdata requests. Not all the functionality is used in `invalidtxrequest.py`, but will be used in `invalidblockrequest.py` and `p2p-fullblocktest` when those are changed to use `BitcoinTestFramework` - third commit tidies up `invalidtxrequest.py` - fourth commit removes usage of `ComparisonTestFramework` Tree-SHA512: f3085c73c15d6ce894e401490bce8a7fa7cf52b0c9d135ff7e351f1f6f517c99accab8588fcdc443f39ea8315329aaabd66b2baa32499df5a774737882030373
2018-02-12Merge #11858: qa: Prepare tests for WindowsWladimir J. van der Laan
faefd29 qa: Prepare functional tests for Windows (MarcoFalke) Pull request description: * Pass `sys.executable` when calling a python script via the subprocess module * Don't remove the log file while it is still open and written to * Properly use os.pathsep and os.path.sep when modifying the PATH environment variable * util-tests: Use os.path.join for Windows compatibility Ref: #8227 Tree-SHA512: c507a536af104b3bde4366b6634099db826532bd3e7c35d694b5883c550920643b3eab79c76703ca67e1044ed09979e855088f7324321c8d52112514e334d614
2018-02-11Fix a-vs-an typospracticalswift
2018-02-10rpc: Reject deprecated reserveChangeKey in fundrawtransactionMarcoFalke
2018-02-09[QA] add NODE_NETWORK_LIMITED address relay and sync testJonas Schnelli
2018-02-09[QA] fix mininode CAddress ser/deserJonas Schnelli
2018-02-08Consistently use FormatStateMessage in RPC error outputBen Woosley
This will include the error code and debug output as well as the reason string. See #11955 for the motivation.
2018-02-08Add test for 'mempool min fee not met' rpc errorBen Woosley
2018-02-08Merge #12282: wallet: Disallow abandon of conflicted txesWladimir J. van der Laan
fa795cf wallet: Disallow abandon of conflicted txes (MarcoFalke) Pull request description: Abandon transactions that are already conflicted is a noop, so don't try and return false/throw instead. Tree-SHA512: fd2af4149bd2323f7f31fe18685c763790b8589319b4e467b464ab456d5e8971501ab16d124e57a22693666b06ae433ac3e59f0fd6dfbd2be2c6cae8be5bcbd8
2018-02-08Merge #12295: Enable flake8 warnings for all currently non-violated rulesMarcoFalke
a9d0ebc262 Enable flake8 warnings for all currently non-violated rules (practicalswift) 4cbab15e75 tests: Fix accidental redefinition of previously defined variable via list comprehension (practicalswift) 0b9207efbe Enable flake8 warning for "list comprehension redefines 'foo' from line N" (F812) (practicalswift) Pull request description: * Enable `flake8` warnings for all currently non-violated rules * Fix accidental redefinition via list comprehension Tree-SHA512: 738b87789e99d02abb2c6b8ff58f65c0cbfeb93e3bf320763e033e510ebd0a4f72861bc8faaf42c14a056a5d4659c33dc70a63730a32cc15159559427bf21193
2018-02-08Merge #12336: Remove deprecated rpc optionsWladimir J. van der Laan
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery) cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery) ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery) d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery) c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery) a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery) a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery) d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery) Pull request description: There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched. - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (#11031) - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (#10858) - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (#11415) - The return format from `addmultisigaddress` has changed (#11415) `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after #11739 and #11398 have been merged and the segwit test code tidied up) Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124