aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-06net: pass CConnman via pointer rather than referenceCory Fields
There are a few too many edge-cases here to make this a scripted diff. The following commits will move a few functions into PeerLogicValidation, where the local connman instance can be used. This change prepares for that usage.
2017-09-07Merge #11219: [docs] explain how to recompile a modified unit testWladimir J. van der Laan
478d4fb79 [docs] explain how to recompile only what bitcoind tests need (Sjors Provoost) Pull request description: It was not obvious to me to run `make` inside the test directory, especially because `make src/test` and `make src/test/test_bitcoin` result in `make: Nothing to be done for ...`. Tree-SHA512: 5fe66c45c50af42d4fed42e3008b1dc4de7ea448f5265a34f4b2f355aa4a48a8187918a49fc9f82e8dd9706bc72c59d0fd67d86057fd816eb317832e46ada7ba
2017-09-06Merge #11238: Add assertions before potential null deferencesWladimir J. van der Laan
c00199244 Fix potential null dereferences (MeshCollider) Pull request description: Picked up by the static analyzer [Facebook Infer](http://fbinfer.com/) which I was playing around with for another research project. Just adding some asserts before dereferencing potentially null pointers. Tree-SHA512: 9c01dab2d21bce75c7c7ef867236654ab538318a1fb39f96f09cdd2382a05be1a6b2db0a1169a94168864e82ffeae0686a383db6eba799742bdd89c37ac74397
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 #11117: Prepare for non-Base58 addressesWladimir J. van der Laan
864cd2787 Move CBitcoinAddress to base58.cpp (Pieter Wuille) 5c8ff0d44 Introduce wrappers around CBitcoinAddress (Pieter Wuille) Pull request description: This patch removes the need for the intermediary Base58 type `CBitcoinAddress`, by providing {`Encode`,`Decode`,`IsValid`}`Destination` functions that directly operate on the conversion between `std::string`s and `CTxDestination`. As a side, it also fixes a number of indentation issues, and removes probably several unnecessary implicit `CTxDestination`<->`CBitcoinAddress` conversions. This change is far from complete. In follow-ups I'd like to: * Split off the specific address and key encoding logic from base58.h, and move it to a address.h or so. * Replace `CTxDestination` with a non-`boost::variant` version (which can be more efficient as `boost::variant` allocates everything on the heap, and remove the need for `boost::get<...>` and `IsValidDestination` calls everywhere). * Do the same for `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey`. However, I've tried to keep this patch to be minimally invasive, but still enough to support non-Base58 addresses. Perhaps a smaller patch is possible to hack Bech32 support into `CBitcoinAddress`, but I would consider that a move in the wrong direction. Tree-SHA512: c2c77ffb57caeadf2429b1c2562ce60e8c7be8aa9f8e51b591f354b6b441162625b2efe14c023a1ae485cf2ed417263afa35c892891dfaa7844e7fbabccab85e
2017-09-06Move CBitcoinAddress to base58.cppPieter Wuille
2017-09-06Introduce wrappers around CBitcoinAddressPieter Wuille
This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
2017-09-06Merge #10845: Remove unreachable codeWladimir J. van der Laan
41bf1598f Remove unreachable code (practicalswift) Pull request description: Remove unreachable code. Tree-SHA512: 2ae94035f693b1ac73b1587eafcc646602a185f6d2b8a24a05939b43235b331c9e6f369ad2e8208624a47c920e989413c6a89ab9b608add5b7be4ebefae2a796
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 #8330: Structure Packing Optimizations in C{,Mutable}TransactionWladimir J. van der Laan
37495e0d8 Reorder C{,Mutable}Transaction for better packing (Jeremy Rubin) Pull request description: These commits revise the layout of a few key classes to eliminate padding, eliminating useless memory overhead. -This reduces CTransaction from 96 bytes to 88 bytes Tree-SHA512: 91d1fec363edebbb1f1a5b98142c767511e99d3be857148a76e31cc512c9ab3d153083fa6b46b6407974d3b88de984b436c33e8606fbb2b273d74c825195aa17
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 #11135: Update developer notes with RPC response guidelinesWladimir J. van der Laan
62ecce75e [doc] Add RPC response notes (João Barbosa) Pull request description: Tree-SHA512: 795969813eefab47ac03050bd70762fc36d86edb00bdfe1ba76837a810370d61dc88749c51153bd3949eb3885f084b4ba8736b4bbf90dfef65e3fe1939304bd8
2017-09-06Merge #11210: Stop test_bitcoin-qt touching ~/.bitcoinWladimir J. van der Laan
dea086f49 Stop test_bitcoin-qt touching ~/.bitcoin (MeshCollider) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/11192 The directory remains unused, but this stops the tests touching ~/.bitcoin at all (namely creating it if it doesn't exist) Tree-SHA512: e59ad6b83dbc5ea2fb2761994c09933721d29668b0eef09b9d938a4ee1c67871c5125c57483ee0ea25f2385e308d275d86bcb9087dd4d502923013b4f3dbac82
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-06[docs] explain how to recompile only what bitcoind tests needSjors Provoost
`make` rebuilds the entire project. This is quite slow if e.g. you're making changes to one file and only wish to run the bitcoind tests. This commit adds an instruction to run `make -C src/test` (as opposed to `make src/test` and `make src/test/test_bitcoin`).
2017-09-06Add savemempool RPCLawrence Nahum
2017-09-06Add return value to DumpMempoolLawrence Nahum
2017-09-06Merge #10596: Add vConnect to CConnman::OptionsWladimir J. van der Laan
352d582ba Add vConnect to CConnman::Options (Marko Bencun) Pull request description: Split the "-connect" argument parsing out of CConnman and put it into AppInitMain(). Tree-SHA512: f2d3efc4e2c5808ff98696ea20dd96df599bc472ed5afc9c3eea305d94c36a6ab50c632aa05396c7c34d1917d91b1e7ccd725656ff2631e2a36d9eac477455dc
2017-09-06Merge #10825: net: set regtest JSON-RPC port to 18443 to avoid conflict with ↵Wladimir J. van der Laan
testnet 18332 ce3baa193 changed regtest RPCport to 18443 to avoid conflict with testnet 18332 (Ferdinando M. Ametrano) Pull request description: using the same JSON-RPC default port for both testnet and regtest prevents running both at the same time on the same machine. Since RPCport=P2Pport-1 for both mainnet and testnet, and regtest P2Pport being 18444, 18443 is proposed for regtest RPCport Documentation has been updated (or created where missing); manpages doc/man/bitcoin*.1 could include information for regtest too Tree-SHA512: d42185f7ef54dc918ece19b543c8681d08bb9c5a971394e21f2d9a1091734b091b08df69fab622c207b46f402cf9323ded5b7a33fbd0af722388930169124e7f
2017-09-05Merge #11247: qt: Use IsMine to validate custom change addressMarcoFalke
a1ea1cfbd qt: Use IsMine to validate custom change address (Chris Moore) Pull request description: Fixes #11137 Closes #11184 (which was accidentally opened against 0.15 branch) Tree-SHA512: a20a59b4f36c1471a9c84bcc7c69048576d1f413104c299a7ed9ba221f28eddf93d727fca2926420ea5d0dd9aba582924f26a5acd44d995039b7202c73eb53bc
2017-09-05qt: Use IsMine to validate custom change addressChris Moore
(cherry picked from commit c41224dfd51c896341bbf2fa23e160bf5ffe27c3)
2017-09-05Merge #11246: github-merge: Coalesce git fetchesMarcoFalke
dabee00ef github-merge: Coalesce git fetches (Wladimir J. van der Laan) Pull request description: Fetch the destination branch as well as PR in one go. Saves a few seconds (as well as one ssh authentication, when using a yubikey) when using github-merge.py. Tree-SHA512: 618fcc07f60b63de3b7818094c5a307933324b76418aa02c509209bb7b540b3da0abe312bbfd0ca843469ed82228b2c43c2361180ba81bee13038aafac4a14b3
2017-09-05Merge #11173: RPC: Fix currency unit string in the help textMarcoFalke
47ba2c312 Fix currency/fee-rate unit string in the help text (Akio Nakamura) Pull request description: 1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`. In the following 2 RPC commands, `'BTC'` is written directly in the help text. This commit changes them to use that constant. 1) `estimatesmartfee` 2) `estimaterawfee` 2. Some RPC command use `'satoshis'` as the unit. It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text. So, this commit fixes this typo in `getblocktemplate`. Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
2017-09-05github-merge: Coalesce git fetchesWladimir J. van der Laan
Fetch the destination branch as well as PR in one go. Saves a few seconds (as well as one ssh authentication, when using a yubikey) when using github-merge.py.
2017-09-05Merge #11234: Remove redundant testutil.cpp|h filesWladimir J. van der Laan
d1138e362 Remove redundant testutil files (MeshCollider) Pull request description: The only function in testutil.cpp, `GetTempPath()` simply called `fs::temp_directory_path()` directly. This just tidies things up by removing that redundant function and the file containing it I can understand wanting a general util file for tests to use, but if there's nothing in it, we might as well remove it, it can always be added back later when it's put to use. Tree-SHA512: b923f99acf33328743755368a1aa90f5da4a7d5f61b163a4b0b894275c98db80a91edf8f051fbfb4893d970fda5a9078aae78a2672867ff521c4ca4b653c71c0
2017-09-05Merge #11143: Fix include path for bitcoin-config.hWladimir J. van der Laan
5abb93f0e Fix include path for bitcoin-config.h in crypto/common.h (danra) Pull request description: All the other files in the repo which include bitcoin-config.h do so with the appropriate subfolder prefixed: config/bitcoin-config.h The header should be included with the appropriate subfolder here as well. Tree-SHA512: abda23a9cf251553f90afe0ee1866de46ed579471f4139737239a4f9334ca817d985deac6336740898718775d1264c0b80cb348668b10a9cae970895f2de37b8
2017-09-05Merge #11241: [tests] Improve signmessages functional testWladimir J. van der Laan
b3d6fc654 Improve signmessages functional test (Cristian Mircea Messel) Pull request description: This patch improves branch coverage of the test, making sure a message can not be verified with the wrong address or signature. Tree-SHA512: 984eb66af8ba1caaccfb8ce2c5cc89c634a50d2fa587bfaf6e196aaf5b89e77accd76522ac33105621ead795521ec6d90f0afcb3b6064d22e53b54d2b41c7991
2017-09-05Merge #11164: Fix boost headers included as user instead of system headersWladimir J. van der Laan
5ac072caa Fix boost headers included as user instead of system headers (Dan Raviv) Pull request description: In most of the project, boost headers are included as system headers. Fix the few inconsistent places where they aren't. Tree-SHA512: 280af33a7bdc9d68a15b729fa88e1e7627e20a054b8d52a12cc5350c1ac9e9c90fb09f0aa97a00960969f75bcf3403dc52b834c94448b814efa63bfaf3b82663
2017-09-05Merge #11176: build: Rename --enable-experimental-asm to --enable-asm and ↵Wladimir J. van der Laan
enable by default 538cc0ca8 build: Mention use of asm in summary (Wladimir J. van der Laan) ce5381e7f build: Rename --enable-experimental-asm to --enable-asm and enable by default (Wladimir J. van der Laan) Pull request description: Now that 0.15 is branched off, enable assembler SHA256 optimizations by default, but still allow disabling them, for example if something goes wrong with auto-detection on a platform. Also add mention of the use of asm in the configure summary. Tree-SHA512: cd20c497f65edd6b1e8b2cc3dfe82be11fcf4777543c830ccdec6c10f25eab4576b0f2953f3957736d7e04deaa4efca777aa84b12bb1cecb40c258e86c120ec8
2017-09-05Merge #11236: Add note on translations to CONTRIBUTING.mdWladimir J. van der Laan
87fe21f81 Add translation note to CONTRIBUTING.md (MeshCollider) Pull request description: The readme mentions it but there is no note in contributing.md, so this just adds a note there as suggested by https://github.com/bitcoin/bitcoin/pull/11235#issuecomment-327110644 Tree-SHA512: 915afd7d38e06ca771084d1e7a931bf230961003dc1657165e6a3b8b55893427f76a4e6846993c351bda2ed4da2c9ab4b9634390cbc4391479f39b6b7556bca8
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-05Allow setting nMinimumChainWork on command lineSuhas Daftuar
2017-09-05Merge #11179: rpc: Push down safe mode checksWladimir J. van der Laan
ec6902d0e rpc: Push down safe mode checks (Andrew Chow) Pull request description: This contains most of the changes of #10563 "remove safe mode" by @achow101, but doesn't remove the safe mode yet, but put an `ObserveSafeMode()` check in (all 23) individual calls which used to have okSafeMode=false. This cleans up the ugly "okSafeMode" flag from the dispatch tables, which is not a concern for the RPC server. Extra-author: Wladimir J. van der Laan <laanwj@gmail.com> Tree-SHA512: eee0f251fe2f38f122e7391e3c4e98d6a1e2757f3b718d6b560ad835ae94f11490865a0aef893e90b5fe298165932c8dd8298224173ac2677a5245cd532bac6e
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.
2017-09-05Add translation note to CONTRIBUTING.mdMeshCollider
2017-09-05Remove redundant testutil filesMeshCollider
2017-09-05Fix currency/fee-rate unit string in the help textAkio Nakamura
1. The RPC help text should use the constant CURRENCY_UNIT defined in policy/feerate.cpp instead of the literal 'BTC'. In the following 2 RPC commands, 'BTC' is written directly in the help text. 1) estimatesmartfee 2) estimaterawfee And also, for these help strings, the notation 'fee-per-kilobyte (in BTC)' is somewhat ambiguous. To write more precisely, this commit changes to 'fee rate in BTC/kB' with using the constant CURRENCY_UNIT. 2. Some RPC command use 'satoshis' as the unit. It should be written as 'satoshis' instead of 'Satoshis' in the RPC help text. So, this commit fixes this typo in getblocktemplate. 3. The phrase that '... feerate (BTC per KB) ...' is used to explain the fee rate in the help text of following 2 RPC commands. 1) getmempoolinfo 2) fundrawtransaction But they are different from other similar help text of the RPCs. And also, 'KB' implies Kibibyte (2^10 byte). To unify and to clarify, this commit changes these phrase to '... fee rate in BTC/kB ...'. (BTC references the constant 'CURRENCY_UNIT')
2017-09-04Merge #10701: Remove the virtual specifier for functions with the override ↵MarcoFalke
specifier 1bcd44223 Remove the virtual specifier for functions with the override specifier (practicalswift) Pull request description: Remove the `virtual` specifier for functions with the `override` specifier. `override` implies that the function is virtual (in addition - of course - to guaranteeing that the function is overriding a virtual function from a base class). Tree-SHA512: 2e83e1b3651f55f8f2645282114ab087ad3a0be8826f26ee5c2064d0952f677290b97261398c1d524ec7f87bbbfdbeefc141180f6099c8bbfa4c59a14f7fa755
2017-09-02Merge #11198: [Qt] Fix display of package name on 'open config file' tooltipMarcoFalke
14ccd4d8d [Qt] Fix display of package name on 'open config file' tooltip (Daniel Edgecumbe) Pull request description: This patch addresses https://github.com/bitcoin/bitcoin/issues/11197. Tree-SHA512: b826fa2eb69f2c8054d2e84614e067bb00d2176701992dadfea01c2ad63d29015acdb76c5b874f5f6bda52b1f05e3ccfa1b67a4ee2f1e0c26496d1ff1718f325
2017-09-02Merge #11216: Update hmac_sha256.hMarcoFalke
dc334fe74 Update hmac_sha256.h (Utsav Gupta) Pull request description: Fixed a typo Tree-SHA512: 60c2ca37583274394c3235cad1118e0ddb89d92bc9c9461fbd191e46bb77a94a4ce11be354eb84ac368a5dc58e66f081382e47ea462e5604e6abec11f428c730
2017-09-02Merge #11136: Docs: Add python3 to list of dependencies on some platformsMarcoFalke
7bb5d3000 Add python3 to list of dependencies on some platforms (danra) Pull request description: python3 is required for running the unit tests on macOS. Without python3 on macOS, 'make check' fails because /test/util/bitcoin-util-test.py fails to find python3. Tree-SHA512: 71dd43bc9099e8431c0b4296301147068282a9f6fed424d7640271b149a51dedeb8fd1386350f08333eb1383ac09b1183c2600347d43367bbb2804abd4fb6e52
2017-09-02Update hmac_sha256.hUtsav Gupta
Fixed a typo
2017-09-01Merge #11215: [tests] fixups from set_test_params()Pieter Wuille
3918d93f3 [tests] fixups from set_test_params() (John Newbery) Pull request description: #11121 had a silent merge conflict in `bitcoin_cli.py`. This fixes it. Also fixes a comment in `example_test.py` Tree-SHA512: f22a645c51c9aeda005526338ad6f2ee07f2bab172847fc54f51fecf1c79e778970be61e5e637d4e0aba3a02e5aba0737b0b57f1bc11a514a1acd94c221b54d6
2017-09-01[tests] fixups from set_test_params()John Newbery
2017-09-01Merge #11121: TestNode tidyupsMarcoFalke
7148b74dc [tests] Functional tests must explicitly set num_nodes (John Newbery) 5448a1471 [tests] don't override __init__() in individual tests (John Newbery) 6cf094a02 [tests] Avoid passing around member variables in test_framework (John Newbery) 36b626867 [tests] TestNode: separate add_node from start_node (John Newbery) be2a2ab6a [tests] fix - use rpc_timeout as rpc timeout (John Newbery) Pull request description: Some additional tidyups after the introduction of TestNode: - commit 1 makes TestNode use the correct rpc timeout. This should have been included in #11077 - commit 2 separates `add_node()` from `start_node()` as originally discussed here: https://github.com/bitcoin/bitcoin/pull/10556#discussion_r121161453 with @kallewoof . The test writer no longer needs to assign to `self.nodes` when starting/stopping nodes. - commit 3 adds a `set_test_params()` method, so individual tests don't need to override `__init__()` and call `super().__init__()` Tree-SHA512: 0adb030623b96675b5c29e2890ce99ccd837ed05f721d0c91b35378c5ac01b6658174aac12f1f77402e1d38b61f39b3c43b4df85c96952565dde1cda05b0db84
2017-09-01[tests] Functional tests must explicitly set num_nodesJohn Newbery
2017-09-01[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.
2017-09-01[tests] Avoid passing around member variables in test_frameworkJohn Newbery
2017-09-01[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.