aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-07-24Merge #16445: test: Skip flaky p2p_invalid_messages test on macOSMarcoFalke
c3dfc9103260935261eaf6cfbacf0623003f116d test: Skip flaky p2p_invalid_messages test on macOS (Fabian Jahr) Pull request description: This mitigates https://github.com/bitcoin/bitcoin/issues/15400 I had a look into the issue today and this seems to be the best we can do given that the root causes some unexpected custom error code from the macOS kernel that python/asyncio doesn't know how to handle properly yet. Top commit has no ACKs. Tree-SHA512: 20a0551d45c405b6eb0ae58190b701c7026c52eff6c434bc678f723a4dabf0074e5b52a8bb3d51ee7132dc29419d1e67a24696761c444c62cd4d429ec768e67d
2019-07-23Merge #16366: init: Use InitError for all errors in bitcoind/qtMarcoFalke
fa6f402bde146f92ed131e0c9c8e15a55e723307 Call node->initError instead of InitError from GUI code (Russell Yanofsky) fad2502240a1c440ef03ac3f880475702e418275 init: Use InitError for all errors in bitcoind/qt (MarcoFalke) Pull request description: Using the same InitError for startup error in the daemon and the gui makes it possible to run the tests with the gui again: ```sh BITCOIND=bitcoin-qt ./test/functional/test_runner.py feature_includeconf feature_config_args ACKs for top commit: hebasto: ACK fa6f402bde146f92ed131e0c9c8e15a55e723307 ryanofsky: utACK fa6f402bde146f92ed131e0c9c8e15a55e723307. Only changes since last review are removing more includes and adding Node::initError method to avoid accessing node `InitError` function and global variables from GUI code. Tree-SHA512: bd19e08dcea4019dfe40356bc5c63cb583cefed54b6c9dcfb82f1b5b00308d8e2b363549afcaea5e93bf83864dbe0917400c3b70f43a8a5bdff45c9cd34cc294
2019-07-23test: Skip flaky p2p_invalid_messages test on macOSFabian Jahr
2019-07-19Merge #15681: [mempool] Allow one extra single-ancestor transaction per packageWladimir J. van der Laan
50cede3f5a4d4fbfbb7c420b94e661a6a159bced [mempool] Allow one extra single-ancestor transaction per package (Matt Corallo) Pull request description: This implements the proposed policy change from [1], which allows certain classes of contract protocols involving revocation punishments to use CPFP. Note that some such use-cases may still want some form of one-deep package relay, though even this alone may greatly simplify some lightning fee negotiation. [1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-November/016518.html ACKs for top commit: ajtowns: ACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced -- looked over code again, compared with previous commit, compiles, etc. sdaftuar: ACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced ryanofsky: utACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced. Changes since last review: adding EXTRA_DESCENDANT_TX_SIZE_LIMIT constant, changing max ancestor size from 1,000,000 to nLimitAncestorSize constant (101,000), fixing test comment and getting rid of unused test node. Tree-SHA512: b052c2a0f384855572b4579310131897b612201214b5abbb225167224e4f550049e300b471dbf320928652571e92ca2d650050b7cf39ac92b3bc1d2bcd386c1c
2019-07-19Merge #16152: Disable bloom filtering by default.fanquake
bead32e31e399090af30b2ee3539995d4105a66d Add release notes for DEFAULT_BLOOM change (Matt Corallo) f27309f55c4fa2b115525d72abb280757a568709 Move DEFAULT_PEERBLOOMFILTERS from validation.h to net_processing.h (Matt Corallo) 5efcb772838e404ca5757818d5548efcb872724b Disable bloom filtering by default. (Matt Corallo) Pull request description: BIP 37 bloom filters have been well-known to be a significant DoS target for some time. However, in order to provide continuity for SPV clients relying on it, the NODE_BLOOM service flag was added, and left as a default, to ensure sufficient nodes exist with such a flag. NODE_BLOOM is, at this point, well-established and, as long as there exist 0.18 nodes with default config (which I'd anticipate will be true for many years), will be available from some peers. By that time, the continued slowdown of BIP 37-based filtering will likely have rendered it useless (though this is already largely the case). Further, BIP 37 was deliberately never updated to support witness-based filtering as newer wallets are expected to migrate to some yet-to-be-network-exposed filters. ACKs for top commit: jnewbery: ACK bead32e31e399090af30b2ee3539995d4105a66d kallewoof: ACK bead32e31e399090af30b2ee3539995d4105a66d Tree-SHA512: ecd901898e8efe1a7c82b471af0acc2373c2282ac633eb58d9aae7c35deda1999d0f79fb0485e6cecbda7246aeda00206cd82c7fa36866e2ac64705ba93f9390
2019-07-18QA: Fix race condition in wallet_encryption testJonas Schnelli
2019-07-18Merge #16374: test: Enable passing wildcard test names to test runner from rootfanquake
e142ee03e7a139168aa1dbf5910c616f60d25042 doc: describe how to pass wildcard names to test runner (Jon Atack) 6a7a70b8cf05a82737c72020fd2b0eebc97cb5e4 test: enable passing wildcards with path to test runner (Jon Atack) Pull request description: Currently, passing wildcard testname args to the test runner from outside the test/functional/ directory does not work, even though developers expect it to. See these recent IRC discussions for more background: http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-10.html#l-262 (lines 262 to 323) and http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-11.html#l-134. 1. [BUGFIX] Enable passing wildcards with paths. Examples: - `test/functional/test_runner.py test/functional/wallet*` - `functional/test_runner.py functional/wallet*` - `test/functional/test_runner.py ./test/functional/tool* test/functional/mempool*` - A current limitation this PR does not change: 9 test files with arguments in their filename are not picked up by wildcard search. 2. [Docs] Describe how to pass wildcard names (multiple and with paths) to the test runner in test/README.md. ACKs for top commit: jnewbery: tested ACK e142ee03e7a139168aa1dbf5910c616f60d25042 jachiang: Tested ACK https://github.com/bitcoin/bitcoin/commit/e142ee03e7a139168aa1dbf5910c616f60d25042. Thanks a lot for this fix! MarcoFalke: ACK e142ee03e7a139168aa1dbf5910c616f60d25042, fine with me Tree-SHA512: cb3d994880cdc9b8918546b573a25faa5b4c7339826ac7cfe20f076aac6e731a34271609c0cf5a7ee5e4a2d5ae205298319d24bf36ef5b5d569a1a0c57883e54
2019-07-16Merge #15891: test: Require standard txs in regtest by defaultMarcoFalke
fa89badf887dcc01e5bdece248b5e7d234fee227 test: Require standard txs in regtest (MarcoFalke) fa9b4191609c3ef75e69d391eb91e4d5c1e0bcf5 test: Add test that mainnet requires standard txs (MarcoFalke) fa613ca0a8f99c4771859de9e571878530d3ecb5 chainparams: Remove unused fMineBlocksOnDemand (MarcoFalke) Pull request description: I don't see a reason why regtest should allow non-standard txs, as it makes testing mainnet behaviour such as #15846 unnecessarily hard and unintuitive. Of course, testnet policy remains unchanged to allow propagation of non-standard txs. ACKs for top commit: ajtowns: ACK fa89badf887dcc01e5bdece248b5e7d234fee227 Tree-SHA512: c4c675affb054868850bd2683aa07f4c741a448cbacb2ea8334191e105f426b0790fe6a468be61e9c5880d24154f7bf1c7075051697172dce92180c1bc3a1c90
2019-07-16Merge #16390: qa: Add --filter option to test_runner.pyMarcoFalke
1a6242526093424947eb49f3416dc0c6bc9fc3a8 qa: Add --filter option to test_runner.py (João Barbosa) Pull request description: Allows to run functional tests like: ```sh test/functional/test_runner.py --filter wallet ``` ACKs for top commit: jonatack: ACK 1a6242526093424947eb49f3416dc0c6bc9fc3a8 Tree-SHA512: 53199e01da3b2e0112843c1c68c69d8fd7fc9bb6a6cb45a81c324973c4824ebf5fef574f9efab81a64d52e397e25d979ae40f0eaba35afb771e80012768f0b08
2019-07-16qa: Add --filter option to test_runner.pyJoão Barbosa
2019-07-15Merge #15282: test: Replace hard-coded hex tx with class in test frameworkMarcoFalke
8f250ab7882a852f1b1947cef4837d2de5ca6913 TEST: Replace hard-coded hex tx with classes (Steven Roose) Pull request description: Came across these breaking Elements. ACKs for top commit: MarcoFalke: ACK 8f250ab7882a852f1b1947cef4837d2de5ca6913 instagibbs: utACK https://github.com/bitcoin/bitcoin/commit/8f250ab7882a852f1b1947cef4837d2de5ca6913 Tree-SHA512: e8615dad4cda0beea4b0c7d4951a467fb9882a0a64d49c9b5ecf167369ea62a3fe5348e2401153162b0ccadecdb128492c94be36ebb881c3c42659626d86eda8
2019-07-15doc: describe how to pass wildcard names to test runnerJon Atack
2019-07-15test: enable passing wildcards with path to test runnerJon Atack
Currently, passing wildcard testname args to the test runner from outside the `test/functional/` directory does not work. See this recent IRC discussion for more background: http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-10.html#l-262 (lines 262 to 323). This small change enables passing multiple wildcards with paths, as long as the paths are coherent. Examples: - test/functional/test_runner.py test/functional/wallet* - functional/test_runner.py functional/wallet* - test/functional/test_runner.py ./test/functional/tool* test/functional/mempool* A current limitation that this PR does not change: 9 test files with arguments in their name are not picked up by wildcard search. - Squashed commit: non-mutating version - Squashed commit: minor code optimisation
2019-07-12Merge #16334: test: rpc_users: Also test rpcauth.py with password.Wladimir J. van der Laan
e263a343d4b6a2622df6bb734cd9d51a0d20a663 test: rpc_users: Make variable names more clear. (Carl Dong) 830dc2dd0fccb7f3ec49ff7233a188d92c541e7e test: rpc_users: Also test rpcauth.py with specified password. (Carl Dong) c73d871799982ca29c29cef90e1a78814cf34019 test: rpc_users: Add function for testing auth params. (Carl Dong) 604e2a997ff26202dd0fa1932d60dc14cc53ac6d test: rpc_users: Add function for auth'd requests. (Carl Dong) Pull request description: Fixes #14758 First two commits are tidy-ups which I feel are worthwhile as they are very straightforward, cut down the file by 50%, and made the final diff more minimal. Happy to squash after review. ACKs for top commit: laanwj: ACK e263a343d4b6a2622df6bb734cd9d51a0d20a663 Tree-SHA512: aa75c48570a87060238932d4c68e17234e158077f6195fb4917367e1ecc565e3cd8dd0ae51f9159ddd3d03742739680391bc1246454302db22d4a608c0633e80
2019-07-11init: Use InitError for all errors in bitcoind/qtMarcoFalke
Also, remove unused <boost/thread.hpp> include (and others)
2019-07-10Merge #16322: wallet: Fix -maxtxfee check by moving it to ↵Wladimir J. van der Laan
CWallet::CreateTransaction 0d101a340c44841cbbc5982d55354b1787bc39e2 test: Add test for maxtxfee option (MarcoFalke) 177550101b600ccb32886695326eb72cd9752c8b wallet: Remove unreachable code in CreateTransaction (MarcoFalke) 5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7 wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction (João Barbosa) Pull request description: Follow up to #16257, this PR makes `bumpfee` aware of `-maxtxfee`. It also prevents dangling locked unspents when calling `fundrawtransaction` - because the previous check was after `LockCoin`. ACKs for top commit: MarcoFalke: re-ACK 0d101a340c44841cbbc5982d55354b1787bc39e2, only change is small test fixup Tree-SHA512: 3464b24ae7cd4e72ed41438c6661828ba1304af020f05da62720b23668ae734e16cf47c6d97e150cc84ef631ee099b16fc786c858f3d089905845437338fd512
2019-07-10test: Add test for maxtxfee optionMarcoFalke
2019-07-09[mempool] Allow one extra single-ancestor transaction per packageMatt Corallo
This implements the proposed policy change from [1], which allows certain classes of contract protocols involving revocation punishments to use CPFP. Note that some such use-cases may still want some form of one-deep package relay, though even this alone may greatly simplify some lightning fee negotiation. [1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-November/016518.html
2019-07-08test: rpc_users: Make variable names more clear.Carl Dong
2019-07-08test: rpc_users: Also test rpcauth.py with specified password.Carl Dong
2019-07-08test: rpc_users: Add function for testing auth params.Carl Dong
2019-07-08test: rpc_users: Add function for auth'd requests.Carl Dong
2019-07-08Merge #14505: test: Add linter to make sure single parameter constructors ↵Wladimir J. van der Laan
are marked explicit c4606b84329d760d7cee144bebe05807857edaae Add Travis check for single parameter constructors not marked "explicit" (practicalswift) Pull request description: Make single parameter constructors `explicit` (C++11). Rationale from the developer notes: > - By default, declare single-argument constructors `explicit`. > - *Rationale*: This is a precaution to avoid unintended conversions that might > arise when single-argument constructors are used as implicit conversion > functions. ACKs for top commit: laanwj: ACK c4606b84329d760d7cee144bebe05807857edaae Tree-SHA512: 3e6fd51935fd93b2604b2188664692973d0897469f814cd745b5147d71b99ea5d73c1081cfde9f6393f51f56969e412fcda35d2d54e938a3235b8d40945f31fd
2019-07-08Merge #16291: gui: Stop translating PACKAGE_NAMEMarcoFalke
fa64b947bb3075ff8737656706b941af691908ab util: No translation of `Bitcoin Core` in the copyright (MarcoFalke) fab85208f678ba1be53bdb73a73ce3c5c937d448 qt: Run «make translate» in ./src/ (MarcoFalke) fabe87d2c923ab3a70b8cde2666a4d1cda8b22fb scripted-diff: Avoid passing PACKAGE_NAME for translation (MarcoFalke) fa5e9f157e568b7fbbea1482b393181f0733f2ba build: Stop translating PACKAGE_NAME (MarcoFalke) Pull request description: Generally the package name is not translated, but the package description is. E.g. `GIMP` or `Firefox` are always called that way regardless of the system language. However, "`Firefox` webbrowser" or "`GIMP` image manipulation program" are translated. ACKs for top commit: hebasto: ACK fa64b947bb3075ff8737656706b941af691908ab, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged. Tree-SHA512: 626f811531182d0ba0ef1044930d32726773349bcb49b10261288a86ee6b80a183db30a87d817d5b0d501fad058ac22d6272311716b4f5a154f17c6f391a5a1a
2019-07-08Merge #15687: test: tool wallet test coverage for unexpected writes to walletWladimir J. van der Laan
7195fa792fcc19e9c064c4e38814c3b46a210b34 test: Tool wallet test coverage for unexpected writes to wallet (Jon Atack) 3bf2b3a37bbd550491d124b77fd7c1b2a7969f66 test: Split tool_wallet.py test into subtests (Jon Atack) 1eb13f09a9d8c2c7dc69f4cdf1b1ccf632543aa0 test: Add log messages to test/functional/tool_wallet.py (Jon Atack) Pull request description: This pull request adds test coverage in `test/functional/tool_wallet.py` to reproduce unexpected writes to the wallet as described in https://github.com/bitcoin/bitcoin/issues/15608 and serve as a benchmark for fixing the issue: - Wallet tool `info` unexpectedly writes to the wallet file if the wallet file permissions are read/write. - Wallet tool `info` raises with "Error loading . Is wallet being used by another process?" if the wallet file permissions are read-only. Goals: 1. Reproduce the reported issue, define the current unexpected behavior, and add test coverage to guide a future fix. Add debug-level logging for sanity checking and commented-out assertions to be uncommented when fixing the issue. Add the same coverage to the wallet tool create test and the getwalletinfo test as regression tests while fixing the issue. 2. Add info log messages as there are currently none in the test file. 3. Split the tests out to separate functions as per review feedback. Thanks to Marco Falke for pointing me in the right direction. ACKs for top commit: laanwj: code review ACK 7195fa792fcc19e9c064c4e38814c3b46a210b34 Tree-SHA512: 16a41cce989c8f819cf5b02c6cf8ea84653ede2738fb402f6c36cf4dc075b424dff3e2c73a1cfa1ec9c75f614675baecc71e588845a2596db06ba0957db2df7b
2019-07-08test: Tool wallet test coverage for unexpected writes to walletJon Atack
This commit adds test coverage in `test/functional/tool_wallet.py` to reproduce unexpected writes to the wallet as described in https://github.com/bitcoin/bitcoin/issues/15608: - wallet tool `info` unexpectedly writes to the wallet file if the wallet file permissions are read/write. - wallet tool `info` raises with "Error loading . Is wallet being used by another process?" if the wallet file permissions are read-only. 1. Reproduce the reported issue, define the current unexpected behavior, and add test coverage to guide a future fix in the form of commented-out assertions to be uncommented when testing/fixing. 2. Provisionally extend the same coverage to the wallet tool create test and the getwalletinfo test as regression tests while fixing the issue. 3. Add some logging for sanity checking. ------ Changes after rebase: 5. Make wallet_path an instance method instead of a function in tool_wallet.py as per Marco Falke review suggestion. 6. Assert wallet permissions instead of logging them in tool_wallet.py. This ran into an issue with Appveyor keeping permissions at 666 so allowed for 666 as a workaround. 7. Change the added logging from info to debug level. 8. More helpful assertions order in tool_wallet.py#assert_tool_output. This change makes #assert_tool_output raise "Error loading wallet.dat. Is wallet being used by another process?" rather than a less-helpful message when debugging the read-only wallet permissions issue.
2019-07-08test: Split tool_wallet.py test into subtestsJon Atack
as per Marco Falke review suggestion.
2019-07-08test: Add log messages to test/functional/tool_wallet.pyJon Atack
and update code comments as per Python PEP 8 style guide.
2019-07-07Merge #16326: [RPC] add new utxoupdatepsbt arguments to the CRPCCommand and ↵fanquake
CPRCCvertParam tables 91cc18f602fe2ff7fe47335a8e1e7734895a19d9 [docs] Add release notes for PR 15427 (John Newbery) 3b11420b3c91f731b03805a39e48ee32e54484a2 [RPC] add new utxoupdatepsbt arguments to the CRPCCommand and CPRCConvertParam tables (John Newbery) Pull request description: The new `descriptors` argument was not added to the CRPCCommand and CPRCCvertParam tables, meaning that it couldn't be used with bitcoin-cli or named arguments. Before this PR: ``` > bitcoin-cli utxoupdatepsbt 'cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' "[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]" error code: -3 error message: Expected type array, got string > bitcoin-cli --named utxoupdatepsbt psbt='cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' descriptors="[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]" error code: -8 error message: Unknown named parameter descriptors ``` After this PR: ``` bitcoin-cli utxoupdatepsbt 'cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' "[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]" cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA== bitcoin-cli --named utxoupdatepsbt psbt='cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA==' descriptors="[{\"desc\":\"sh(wpkh([bd50871a/0h/0h/0h]03895c66337b38699bfafff1084ad35bc347fac4f4e5e5fe5eb7dd81155280db53))\"}]" cHNidP8BAFMCAAAAAYCdwVRx2X3o4KHx5tAMsN1ddp51MbfWsietjfMbl5HtAAAAAAD/////AQDh9QUAAAAAF6kUW+rtEOi4nk9rpw2F5XZl1dd8ehGHAAAAAAAAAA== ``` ACKs for top commit: promag: ACK 91cc18f. fanquake: re-ACK 91cc18f602fe2ff7fe47335a8e1e7734895a19d9 Tree-SHA512: 279b2339a5cac17e363002e4ab743e251d6757c904c89f1970575bdce18d4f63d5e13507e171bf2bdc1bf6dd457db345a4b11b15d4ff71b96c2fedc4ffe52b23
2019-07-05Merge #16327: scripts and tools: Update ShellCheck linterfanquake
1ac454a3844b9b8389de0f660fa9455c0efa7140 Enable ShellCheck rules (Hennadii Stepanov) Pull request description: Enable some simple ShellCheck rules. Note for reviewers: `bash` and `shellcheck` on macOS are different from ones on Ubuntu. For local tests the latest `shellcheck` version 0.6.0 should be used (see #15166). ACKs for top commit: practicalswift: utACK 1ac454a3844b9b8389de0f660fa9455c0efa7140 dongcarl: utACK 1ac454a fanquake: ACK 1ac454a3844b9b8389de0f660fa9455c0efa7140 Tree-SHA512: 8d0a3a5c09fe1a0c22120178f5e6b80f81f746f8c3356b7701ff301c117acb2edea8fe08f08fb54ed73f94b1617515fb239fa28e7ab4121f74872e6494b6f20e
2019-07-04Enable ShellCheck rulesHennadii Stepanov
Enabled ShellCheck rules: SC1087 SC2001 SC2004 SC2005 SC2006 SC2016 SC2028 SC2048 SC2066 (note that IFS already contains only a line feed) SC2116 SC2166 SC2181 SC2206 SC2207 SC2230 SC2236
2019-07-04[RPC] add new utxoupdatepsbt arguments to the CRPCCommand and ↵John Newbery
CPRCConvertParam tables The new `descriptors` argument needs to be added to the Command and ConvertParams tables to by usable as a named argument and by bitcoin-cli. Also update the test to use named arguments to test this.
2019-07-03Merge #16329: test: Add tests for getblockchaininfo.softforksMarcoFalke
faf6caf4daa33b9179f4f02c09e184245ea53fa1 test: Add tests for getblockchaininfo.softforks (MarcoFalke) Pull request description: ACKs for top commit: laanwj: Code review ACK faf6caf4daa33b9179f4f02c09e184245ea53fa1 Tree-SHA512: 8a0bb3b648f18fdba7a36a960d70c6217fd7312cf2ef52b3b911be0d7f1d27c5c50856946d7e6cb81d96c081913b7308cc5f9d89af34518439ff4ada024441da
2019-07-03Merge #16325: rpc: Clarify that block count means height excl genesisWladimir J. van der Laan
fab0c820fa4c0c3227eec85c64310a3bf938a149 rpc: Clarify that block count means height excl genesis (MarcoFalke) Pull request description: There is a common misconception that the block count returned by the blockchain rpcs includes the genesis block. See for example the discussion in https://github.com/bitcoin/bitcoin/pull/16292#issuecomment-506303256. However, it really returns the height, which is `0` for the genesis block. So clarify that and also remove the misleading "longest blockchain" comment. Finally, fix the wallet test that incorrectly used this rpc. ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16325/commits/fab0c820fa4c0c3227eec85c64310a3bf938a149 promag: ACK fab0c82, sorry for the misconception. Tree-SHA512: 0d087cbb628d3866352bca6420402f392e6a997e579941701a408a7fca355d84645045661f39b022e4479cc07f85a6cddaa9095b6fd9911b245692482420a5e4
2019-07-03Merge #15483: rpc: Adding a 'logpath' entry to getrpcinfoWladimir J. van der Laan
8a6810d0d2759c69f63b53c48aa79e0cfdd88ffb Add a 'logpath' field to getrpcinfo (darosior) Pull request description: as discussed in #15438 ACKs for top commit: laanwj: Tested ACK 8a6810d0d2759c69f63b53c48aa79e0cfdd88ffb Tree-SHA512: 752c7d90f670677c8144efb338c5c97c2264f85f1e65e031fd5a44f04230b6eafbabd0f634db263eb42c25642ecc1c4b1b602d4735e3fab07ec00b566134ddab
2019-07-02Merge #16250: signrawtransactionwithkey: report error when missing ↵MarcoFalke
redeemScript/witnessScript 01174596e69568c434198a86f54cb9ea6740e6c2 signrawtransactionwithkey: report error when missing redeemScript/witnessScript param (Anthony Towns) Pull request description: Adding support for "witnessScript" as an alternative to "redeemScript" when using "signrawtransactionwithkey" meant that the `RPCTypeCheckObj()` call in `SignTransaction` can't error out just because either parameter is missing -- it's only a problem if both are missing, which isn't a state `RPCTypeCheckObj()` tests for. This results in the regression described in #16249. This patch adds some code to test for this case and give a similar error, namely: error code: -8 error message: Missing redeemScript/witnessScript Fixes: #16249 ACKs for top commit: meshcollider: utACK https://github.com/bitcoin/bitcoin/pull/16250/commits/01174596e69568c434198a86f54cb9ea6740e6c2 promag: ACK 01174596e. Could also write test without `dict`/`del`: Tree-SHA512: cf51346b7dea551b7f18f2a93c2a336a293b2535c62c03a5263cd2be8c58cf0cc302891da659c167e88ad1a68a756472c3c07e99f71627c61d32886fc5a3a353
2019-07-02test: Add tests for getblockchaininfo.softforksMarcoFalke
2019-07-02rpc: Clarify that block count means height excl genesisMarcoFalke
2019-07-02wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransactionJoão Barbosa
2019-07-02Merge #15427: Add support for descriptors to utxoupdatepsbtWladimir J. van der Laan
26fe9b990995f9cb5eee21d40b4daaad19f7181f Add support for descriptors to utxoupdatepsbt (Pieter Wuille) 3135c1a2d2e2fb31bc362c848bd2456d576e408b Abstract out UpdatePSBTOutput from FillPSBT (Pieter Wuille) fb90ec3c33e824f5abb6a68452c683d6ce8b3e4a Abstract out EvalDescriptorStringOrObject from scantxoutset (Pieter Wuille) eaf4f887348a08c620732125ad4430e1a133d434 Abstract out IsSegWitOutput from utxoupdatepsbt (Pieter Wuille) Pull request description: This adds a descriptors argument to the `utxoupdatepsbt` RPC. This means: * Input and output scripts and keys will be filled in when known. * P2SH-witness inputs will be filled in from the UTXO set when a descriptor is provided that shows they're spending segwit outputs. This also moves some (newly) shared code to separate functions: `UpdatePSBTOutput` (an analogue to `SignPSBTInput`), `IsSegWitOutput`, and `EvalDescriptorStringOrObject` (implementing the string or object notation parsing used in `scantxoutset`). ACKs for top commit: jnewbery: utACK 26fe9b990995f9cb5eee21d40b4daaad19f7181f laanwj: utACK 26fe9b990995f9cb5eee21d40b4daaad19f7181f (will hold merging until response to promag's comments) promag: ACK 26fe9b9, checked refactors and tests look comprehensive. Still missing a release note but can be added later. Tree-SHA512: 1d833b7351b59d6c5ded6da399ff371a8a2a6ad04c0a8f90e6e46105dc737fa6f2740b1e5340280d59e01f42896c40b720c042f44417e38dfbee6477b894b245
2019-07-02Merge #15538: wallet_bumpfee.py: Make sure coin selection produces changeWladimir J. van der Laan
276972cb95ba944a7a4b1858a08d333962261396 wallet_bumpfee.py: Make sure coin selection produces change (Gregory Sanders) Pull request description: I was hitting the case where change-less transactions were being made. ACKs for top commit: ryanofsky: utACK 276972cb95ba944a7a4b1858a08d333962261396 Tree-SHA512: e2b7a50363daddd3ee749cacfc9d3d685a6c0c7e3e48118bb60131d205bf83ea06cdd66b69dfa3bd4dbb3bbf2b5b673d7225171486ae72fc762e5dabe2c01ef5
2019-07-01TEST: Replace hard-coded hex tx with classesSteven Roose
2019-07-01Merge #16257: [wallet] abort when attempting to fund a transaction above ↵Wladimir J. van der Laan
-maxtxfee 806b0052c3b45415862f74f20ba5f389e5b673de [wallet] abort when attempting to fund a transaction above maxtxfee (Sjors Provoost) Pull request description: `FundTransaction` calls `GetMinimumFee` which, when the fee rate is absurdly high, quietly reduces the fee to `-maxtxfee`. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior. Before: ``` bitcoin-cli walletcreatefundedpsbt '[]' '[{"tb1q...": 0.01}]' 0 '{"feeRate": 10}' true { "psbt": "cHNidP8...gAA=", "fee": 0.10000000, "changepos": 1 } ``` After: ``` bitcoin-cli walletcreatefundedpsbt '[]' '[{"tb1q...": 0.01}]' 0 '{"feeRate": 10}' true error code: -25 error message: Fee exceeds maximum configured by -maxtxfee ``` QT still checks the max fee rate as expected: <img width="566" alt="Schermafbeelding 2019-06-20 om 19 52 00" src="https://user-images.githubusercontent.com/10217/59888424-a2aa7100-9395-11e9-8ae6-8a3c1f7de585.png"> ACKs for top commit: laanwj: Code review ACK 806b0052c3b45415862f74f20ba5f389e5b673de Tree-SHA512: bee95811711cdab100b614d2347921407af3b400aea613ca156953ed3f60b924ad29a1d335bd0e240c0b7c0fbb360226bab03294d226a5560cdf2a3f21e6d406
2019-06-28[wallet] abort when attempting to fund a transaction above maxtxfeeSjors Provoost
FundTransaction calls GetMinimumFee which, when the fee rate is absurdly high, quietly reduced the fee to -maxtxfee. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior.
2019-06-28test: Add missing sync_all to wallet_balance testMarcoFalke
2019-06-27util: No translation of `Bitcoin Core` in the copyrightMarcoFalke
2019-06-26Add Travis check for single parameter constructors not marked "explicit"practicalswift
2019-06-25signrawtransactionwithkey: report error when missing ↵Anthony Towns
redeemScript/witnessScript param
2019-06-22Merge #16239: wallet/rpc: follow-up clean-up/fixes to avoid_reuseMeshCollider
71d0344cf25d3aaf60112c5248198c444bc98105 docs: release note wording (Karl-Johan Alm) 3d2ff379131a01e4e9f9648b150e806104a23795 wallet/rpc: use static help text (Karl-Johan Alm) 53c3c1ea9e20f881c843a9219e48cec202e962f8 wallet/rpc/getbalances: add entry for 'mine.used' balance in results (Karl-Johan Alm) Pull request description: This addresses a few remaining issues pointed out in #13756: * First commit addresses https://github.com/bitcoin/bitcoin/pull/13756#discussion_r284907468 * Second commit addresses https://github.com/bitcoin/bitcoin/pull/13756#discussion_r294868973 Ping jnewbery and achow101 as they pointed out these issues. ACKs for commit 71d034: jnewbery: ACK 71d0344cf25d3aaf60112c5248198c444bc98105 meshcollider: re-utACK https://github.com/bitcoin/bitcoin/pull/16239/commits/71d0344cf25d3aaf60112c5248198c444bc98105 Tree-SHA512: 5e28822af0574ad07dbbed21aa2fe7866bf5770b4c0a1c150ad0da8af3152bcfb7170330a7497fa500326c594740ecf63733cf58325821e2811d7b911d5783a0
2019-06-21test: Require standard txs in regtestMarcoFalke