aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-19qa: Use node.datadir instead of tmpdir in test frameworkMarcoFalke
2018-03-19Merge #12700: Document RPC method aliasingWladimir J. van der Laan
4c317d89e Document RPC method aliasing (Russell Yanofsky) Pull request description: Suggested by @Sjors in https://github.com/bitcoin/bitcoin/pull/11536#issuecomment-372820660 Tree-SHA512: 7bf16238e41b6c6c078e9103d8eac2ac76739a2c16b4f964be49bfde1f20f31a1fb30badf1faaa6ddc301a74f0d785d19567069b50de78c502144479143cb38c
2018-03-19Merge #12553: Prefer wait_until over polling with time.sleepWladimir J. van der Laan
9d7f839a2 test: Use os.path.join consistently in feature_pruning tests (Ben Woosley) 81b082277 test: Use wait_until in tests where time was used for polling (Ben Woosley) Pull request description: This is prompted by and builds on #12545, a nice cleanup / consolidation of patterns. In cases where the exception message was meaningful, I tried to represent it as well in a comment. I expect #12545 will go in first, but I'm happy to squash them if that's preferred. Tree-SHA512: 7a861244001c87fd6b59b6bc248ee741ac8178f7255d6f1fda39bc693c5ff3b7de5f53d13afe9829aef6ea69153481edb0a9d5bc07c36c4f66b4315edd180bb4
2018-03-19Rename wallet_accounts.py testRussell Yanofsky
This is a separate commit because changing the test at the same time as renaming it breaks git (and github) rename detection.
2018-03-19Merge #12408: wallet: Change output type globals to membersWladimir J. van der Laan
fab8a6f60 wallet: Change output type globals to members (MarcoFalke) Pull request description: Output type is used by the wallet when generating addresses or transactions with change, thus it should be a member of `CWallet`. Moreover, in light of multiwallet, it makes sense to prepare for per-wallet attributes instead of for-all-wallets globals. Tree-SHA512: 4fa397cd82522e5bacf4870160a2a0f5e1f2dc046e4b9e2514dee18b187a0e1724d036315f77fa48e48f85533021d5e5525d798160a92d389d75512f3f9e1405
2018-03-19Rename account to label where appropriateRussell Yanofsky
This change only updates strings and adds RPC aliases, but should simplify the implementation of address labels in https://github.com/bitcoin/bitcoin/pull/7729, by getting renaming out of the way and letting it focus on semantics. The difference between accounts and labels is that labels apply only to addresses, while accounts apply to both addresses and transactions (transactions have "from" and "to" accounts). The code associating accounts with transactions is clumsy and unreliable so we would like get rid of it.
2018-03-19Remove unreachable help conditionslutangar
2018-03-19Merge #12678: build: Fix a few compilation issues with Clang 7 and -WerrorWladimir J. van der Laan
8ae413235 Remove redundant checks for MSG_* from configure.ac (Vasil Dimov) 71129e026 Do not check for main() in libminiupnpc (Vasil Dimov) 8c632f73c ax_boost_{chrono,unit_test_framework}.m4: take changes from upstream (Vasil Dimov) Pull request description: Tree-SHA512: a99ef98c0b94f892eadeda24b3d55c25bedf225b98c6e4178cf6c2d886b44d43e9f75414d0b37db9ac261cec2350666e5e64fab9c104249dd34ff485c51663cb
2018-03-19Merge #12720: qa: Avoiding 'file' function name from python2MarcoFalke
0dbb32b2cb Avoiding 'file' function name from python2 with more descriptive variable naming (Jeff Rade) Pull request description: @jnewbery Here is PR from review in [#12437](https://github.com/bitcoin/bitcoin/pull/12437) Tree-SHA512: c61980f4d3170842627cd970e1f6eebaf303843dc5e95a9dcfe3ded08152be533774cb75f56a83af8452b6bcac17c0172cf20e39edf9acefb4a4c255fe893a3b
2018-03-19Qt: remove "new" button during receive-mode in addressbookJonas Schnelli
2018-03-18Avoiding 'file' function name from python2 with more descriptive variable namingJeff Rade
2018-03-18[Tests] Require exact match in assert_start_raises_init_eror()John Newbery
2018-03-18[Tests] Move assert_start_raises_init_error method to TestNodeJohn Newbery
2018-03-17Merge #12710: Append scripts to new test_list array to fix bad assignmentMarcoFalke
b0fec8d623 Append scripts to new test_list array to fix bad assignment (Jeff Rade) Pull request description: Fixes review by @MarcoFalke in PR [#12437](https://github.com/bitcoin/bitcoin/pull/12437) Assignment of `test_list` would point to the same array object as `BASE_SCRIPT` or `ALL_SCRIPTS` which we do not want. Tree-SHA512: 57d6c1f4563aaffbac68e96782283799b10be687292152d70ffbbc22e7b52c11c1af0c483acb01c69fbaa99bdae01431b65a5d1d0a913d549f58dfd95d0d28d9
2018-03-17wallet: Change output type globals to membersMarcoFalke
2018-03-17Append scripts to new test_list array to fix bad assignmentJeff Rade
2018-03-17Merge #12437: [Trivial] Simplify if-else blocks and more descriptive ↵MarcoFalke
variable naming 97bcd36811 [Trivial] Simplify if-else blocks and more descriptive variable naming (Jeff Rade) Pull request description: Was looking through `test_runner.py` to start work on [#11964](https://github.com/bitcoin/bitcoin/issues/11964). Made a few changes to make the file more readable and keep these separate from future PR. Tree-SHA512: 7508f4ee39672d18718d8f80b61b89918eac7b4c75953682b812b73013f18ebd81adc7953f3b6c98c5c598adeb1998f5455f123b5566d1cc03631c7924b4103a
2018-03-16Merge #12542: Remove redundant includes. Conform to header include guidelines.Pieter Wuille
7ef46d063a Remove redundant includes. Conform to header include guidelines. (practicalswift) Pull request description: From the header include guidelines ([developer-notes.md](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#source-code-organization)): > "One exception is that a `.cpp` file does not need to re-include the includes already included in its corresponding `.h` file." Covered in this PR: * `rpc/util.h` includes `pubkey.h` + `utilstrencodings.h`. `rpc/util.cpp` includes `rpc/util.h`. * `util.h` includes `fs.h`. `util.cpp` includes `util.h`. Tree-SHA512: a38d9ecefd8165ad151c1ffde52cfbac968526c49db2080988bf6e6a3daa2ebeceb34d08f817e275edf7c650bf3155de01369bfb352522f8e0ae136b2289b194
2018-03-16[Trivial] Simplify if-else blocks and more descriptive variable namingJeff Rade
2018-03-15test: Use os.path.join consistently in feature_pruning testsBen Woosley
2018-03-15test: Use wait_until in tests where time was used for pollingBen Woosley
2018-03-15Merge #12683: Fix more constness violations in serialization codePieter Wuille
172f5fa738 Support deserializing into temporaries (Pieter Wuille) 2761bca997 Merge READWRITEMANY into READWRITE (Pieter Wuille) Pull request description: This is another fragment of improvements from #10785. The current serialization code does not support serializing/deserializing from/to temporaries (like `s >> CFlatData(script)`). As a result, there are many invocations of the `REF` macro which in addition to changing the reference type also changes the constness. This is unnecessary in C++11 as we can use rvalue references now instead. The first commit is an extra simplification we can make that removes the duplication of code between `READWRITE` and `READWRITEMANY` (and related functions). Tree-SHA512: babfa9cb268cc3bc39917e4f0a90e4651c33d85032161e16547a07f3b257b7ca7940e0cbfd69f09439d26fafbb1a6cf6359101043407e2c7aeececf7f20b6eed
2018-03-15Add static_assert to prevent VARINT(<signed value>)Russell Yanofsky
Using VARINT with signed types is dangerous because negative values will appear to serialize correctly, but then deserialize as positive values mod 128. This commit changes the VARINT macro to trigger an error by default if called with an signed value, and updates broken uses of VARINT to pass a special flag that lets them keep working with no change in behavior.
2018-03-15Merge #12621: Avoid querying unnecessary model data when filtering transactionsPieter Wuille
1ee72a819f qt: Avoid querying unnecessary model data when filtering transactions (João Barbosa) Pull request description: This change moves down model data querying to where it's needed. The worst case remains the same (all data is queried and the row passes) but for the average case it improves the filter performance. Tree-SHA512: 3bcaced029cb39dfbc5377246ce76634f9050ee3a3053db4d358fcbf4d8107c649e75841f21d69f1aebcaf1bbffe3eac784e6b03b366fdbbfec1e0da8f78d8ef
2018-03-15Merge #12693: Remove unused variable in SortForBlockPieter Wuille
bb079a0e2c Remove unused variable in SortForBlock (Drew Rasmussen) Pull request description: Although txiter is passed to BlockAssembler::SortForBlock, it is never used. Other than BlockAssembler::addPackageTxs, no other method ever makes a call to SortForBlock, thus making this change harmless. Tree-SHA512: c7df948c5f75f7371844200e0227a26476437f300148d29020e01041b382f5bda31d9c520c9c5425aee88ce8f4a52cd0e594985d69ed8a081b878cda2e4de8c5
2018-03-15Document RPC method aliasingRussell Yanofsky
Suggested by Sjors Provoost <sjors@sprovoost.nl> in https://github.com/bitcoin/bitcoin/pull/11536#issuecomment-372820660
2018-03-15Test that BnB is not used when there are preset inputsAndrew Chow
2018-03-15Remove redundant checks for MSG_* from configure.acVasil Dimov
It is redundant to check for the presence of MSG_NOSIGNAL macro in configure.ac, define HAVE_MSG_NOSIGNAL and then check whether the later is defined in the source code. Instead we can check directly whether MSG_NOSIGNAL is defined. Same for MSG_DONTWAIT. In addition to that, the checks we had in configure.ac produce a compiler warning about unused variable and thus could fail if -Werror is present and erroneously proclaim that the macros are not available.
2018-03-15Do not check for main() in libminiupnpcVasil Dimov
main() { main(); } causes "infinite recursion" compilation warning which with -Werror fails the check.
2018-03-15ax_boost_{chrono,unit_test_framework}.m4: take changes from upstreamVasil Dimov
Apply changes to build-aux/m4/ax_boost_chrono.m4 and build-aux/m4/ax_boost_unit_test_framework.m4 from upstream: https://github.com/peti/autoconf-archive
2018-03-15Merge #12431: Only call NotifyBlockTip when chainActive changesWladimir J. van der Laan
f98b54352 Only call NotifyBlockTip when the active chain changes (James O'Beirne) 152b7fb25 [tests] Add a (failing) test for waitforblockheight (James O'Beirne) Pull request description: This is a subset of the more controversial https://github.com/bitcoin/bitcoin/pull/12407, but this also adds a test demonstrating the bug. In InvalidateBlock, we're calling NotifyBlockTip with the now-invalid block's prev regardless of what chain the ancestor block is on. This could create numerous issues, but it at least screws up `waitforblockheight` (or anything else relying on `rpc/blockchain.cpp:latestblock`) when InvalidateBlock is called on a block not in chainActive, which can happen via RPC. Only call NotifyBlockTip when the block being marked invalid is on the active chain. Tree-SHA512: 9a54fe5e8c7eb489daf5df4483c0986129e871e2ca931a456ba869ecb5d5a8d4f7bd27ccc9e711e9292c9ed79ddef896c85d0e81fc76883503e327995b0e914f
2018-03-15Actually disable BnB when there are preset inputsAndrew Chow
We don't want to use BnB when there are preset inputs because there is some weirdness with making that work with using the KnapsackSolver as the fallback. Currently we say that we haven't used bnb when there are preset inputs, but we don't actually disable BnB. This fixes that.
2018-03-14Remove unused variable in SortForBlockDrew Rasmussen
2018-03-14Provide relevant error message if datadir is not writable.murrayn
2018-03-14Merge #10637: Coin Selection with Murch's algorithmWladimir J. van der Laan
73b5bf2cb Add a test to make sure that negative effective values are filtered (Andrew Chow) 76d2f068a Benchmark BnB in the worst case where it exhausts (Andrew Chow) 6a34ff533 Have SelectCoinsMinConf and SelectCoins use BnB or Knapsack and use it (Andrew Chow) fab04887c Add a GetMinimumFeeRate function which is wrapped by GetMinimumFee (Andrew Chow) cd927ff32 Move original knapsack solver tests to coinselector_tests.cpp (Andrew Chow) fb716f7b2 Move current coin selection algorithm to coinselection.{cpp,h} (Andrew Chow) 4566ab75f Add tests for the Branch and Bound algorithm (Andrew Chow) 4b2716da4 Remove coinselection.h -> wallet.h circular dependency (Andrew Chow) 7d77eb1a5 Use a struct for output eligibility (Andrew Chow) ce7435cf1 Move output eligibility to a separate function (Andrew Chow) 0185939be Implement Branch and Bound coin selection in a new file (Andrew Chow) f84fed8eb Store effective value, fee, and long term fee in CInputCoin (Andrew Chow) 12ec29d3b Calculate and store the number of bytes required to spend an input (Andrew Chow) Pull request description: This is an implementation of the [Branch and Bound coin selection algorithm written by Murch](http://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf) (@xekyo). I have it set so this algorithm will run first and if it fails, it will fall back to the current coin selection algorithm. The coin selection algorithms and tests have been refactored to separate files instead of having them all in wallet.cpp. I have added some tests for the new algorithm and a test for all of coin selection in general. However, more tests may be needed, but I will need help with coming up with more test cases. This PR uses some code borrowed from #10360 to use effective values when selecting coins. Tree-SHA512: b0500f406bf671e74984fae78e2d0fbc5e321ddf4f06182c5855e9d1984c4ef2764c7586d03e16fa4b578c340b21710324926f9ca472d5447a0d1ed43eb4357e
2018-03-14Merge #12586: docs: Update osx brew install instructionWladimir J. van der Laan
59f47959b docs: Update osx brew install instruction (fanquake) Pull request description: Python 3.x is now the default python formula in [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb). https://brew.sh/2018/01/19/homebrew-1.5.0/ has some more info. Tree-SHA512: f684019126d38debe897287b4bd9803b1ced2c32f66230a8a5eb468759cbec170b9367648bd7ba6dc4ea9489aa85a1b2f0445c384bbc5bf76d18073564f80b59
2018-03-14Merge #12668: Doc: do update before fetching packages in WSL build guideWladimir J. van der Laan
e29c6c8 Ubuntu xenial first dependencies (Nick Vercammen) Pull request description: Add update and upgrade commands to enable the installation of the first dependencies on ubuntu xenial. If those are not executed some packages can not be found. Tree-SHA512: ad15f8f053703f5b785c307a39b28bd3584fb1f9c32cc166e53955733f03ea3df445959577d65ac8c95c3619a0417894121603f8e656421d30992f4fdd6055f9
2018-03-14Merge #12080: Add support to search the address bookWladimir J. van der Laan
c316fdf [qt] Add support to search the address book (João Barbosa) Pull request description: This PR adds support to search the address book for both receiving and sending addresses. A specialisation of the `QSortFilterProxyModel` is added to implement the custom filtering. <img width="757" alt="screen shot 2018-01-03 at 16 05 57" src="https://user-images.githubusercontent.com/3534524/34528196-0347d61e-f0a0-11e7-9bd3-535e9e34ceb8.png"> <img width="759" alt="screen shot 2018-01-03 at 16 00 58" src="https://user-images.githubusercontent.com/3534524/34528202-07c99f24-f0a0-11e7-8e34-cff6a1ba2364.png"> Closes #623. Tree-SHA512: 316e646015c858fc70db6be72dc7922d5bb10a3399e7fa327c992e184cc37a124f11cffefab2dbe0d16bda790c7c0437db364686e66c40b4054b8250b4be15d0
2018-03-14Merge #12666: configure: UniValue 1.0.4 is required for pushKV(, bool)Wladimir J. van der Laan
8172d3a configure: UniValue 1.0.4 is required for pushKV(, bool) (Luke Dashjr) Pull request description: The breaking changes (#12193) are already merged, so this blocks 0.17.0. It depends on jgarzik/univalue#42 or jgarzik/univalue#50 being merged and released in UniValue 1.0.4. Tree-SHA512: 3a21bbc72d6632bd07ee60ad7780b9ee95908357bcf59b4795b693d8a5d8c88943d6451482f11916ff5417e3bdbb9916062f87d0d73e79f50eb95ddabe21f943
2018-03-14Merge #12102: Apply hardening measures in bitcoind systemd service fileWladimir J. van der Laan
79ddfad Apply hardening measurements in bitcoind systemd service file (Florian Schmaus) Pull request description: Adds typical systemd hardening measurements for network services. Tree-SHA512: 63e54d5a2e3e625c123c91e4392474226ec26c48709f2627f4d9d257a59f6960dd53ba4faa10cd355a89cad37fe351e2dbe8db79e681645b59081cf83e940438
2018-03-14Merge #12625: depends: biplist 1.0.3Wladimir J. van der Laan
4ef82f1 depends: biplist 1.0.3 (fanquake) Pull request description: biplist should now be usable for reproducible builds without any patching. One change has been incorporated, the two remaining changes were rejected upstream: https://bitbucket.org/wooster/biplist/pull-requests/9/make-biplist-ordering-deterministic/diff#comment-None testing on gitian cc @jonasschnelli Tree-SHA512: a3ef3ecad08b09f7a34d927bc4e3d8604099e9acb2c984bbe741df6162f4014f40e9eb2fd28309fc79d3dd2bb82f14bfd473925b90048e5fd135a471726a4836
2018-03-14Merge #12638: qa: Cache only chain and wallet for regtest datadirWladimir J. van der Laan
fa23105 qa: Cache only chain and wallet for regtest datadir (MarcoFalke) Pull request description: mempool.dat should be empty and I don't see a need to copy it around when restoring from the cache. Tree-SHA512: f11ab69732db4dee0e9a0900570464e49085532b0cebc963877057112a7b985c477da3d32eb2093daabac9ada9e73b7c49881681ec5efa6101919b0af76001cf
2018-03-14Merge #12682: travis: Clone depth 1 unless $CHECK_DOCWladimir J. van der Laan
fa79016 travis: Clone depth 1 unless $CHECK_DOC (MarcoFalke) Pull request description: As a tiny optimization, we can save about 5-9 seconds for each travis job by cloning only the tip, unless more commits are required for all the various meta checks. Meant as fixup for my pull request #12405 Tree-SHA512: c8a9950a94309cd1dbd764693668e4df5e709129b543ffff5f3522bb1d6b326873501937dd070d301eba9a01df20093460dd3010dcb5c6c05594d6b84a19772b
2018-03-14Merge #12680: Add missing virtual destructor in PeerLogicValidationWladimir J. van der Laan
2b3ea39 Polish interfaces around PeerLogicValidation (Vasil Dimov) Pull request description: Silence the following compiler warning: /usr/include/c++/v1/memory:2285:5: error: delete called on non-final 'PeerLogicValidation' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] delete __ptr; ^ /usr/include/c++/v1/memory:2598:7: note: in instantiation of member function 'std::__1::default_delete<PeerLogicValidation>::operator()' requested here __ptr_.second()(__tmp); ^ init.cpp:201:15: note: in instantiation of member function 'std::__1::unique_ptr<PeerLogicValidation, std::__1::default_delete<PeerLogicValidation> >::reset' requested here peerLogic.reset(); ^ Tree-SHA512: 0e5ead0da2da76a5276cd45e28ddfa4b92cc7225fa154a2662aad88e7210acd17b81431c98e90a2c7be08d39f8689f1d9982cdb18297d4bb0b6195ae40c7ec17
2018-03-14Polish interfaces around PeerLogicValidationVasil Dimov
* Make PeerLogicValidation final to prevent deriving from it [1] * Prevent deletions of NetEventsInterface and CValidationInterface objects via a base class pointer [1] silences the following compiler warning (from Clang 7.0.0): /usr/include/c++/v1/memory:2285:5: error: delete called on non-final 'PeerLogicValidation' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] delete __ptr; ^ /usr/include/c++/v1/memory:2598:7: note: in instantiation of member function 'std::__1::default_delete<PeerLogicValidation>::operator()' requested here __ptr_.second()(__tmp); ^ init.cpp:201:15: note: in instantiation of member function 'std::__1::unique_ptr<PeerLogicValidation, std::__1::default_delete<PeerLogicValidation> >::reset' requested here peerLogic.reset(); ^
2018-03-14Apply hardening measurements in bitcoind systemd service fileFlorian Schmaus
Adds typical systemd hardening measurements for network services.
2018-03-13Merge #9680: Unify CWalletTx constructionPieter Wuille
b4bc32a451 [wallet] Get rid of CWalletTx default constructor (Russell Yanofsky) a128bdc9e1 [wallet] Construct CWalletTx objects in CommitTransaction (Russell Yanofsky) Pull request description: Two commits: - `Construct CWalletTx objects in CommitTransaction` moves a bunch of CWalletTx initialization into CWallet::CommitTransaction to dedup some code and avoid future inconsistencies in how wallet transactions are created. - `Get rid of CWalletTx default constructor` does what is described and eliminates the possibility of empty transaction entries being inadvertently created by mapWallet[hash] accesses. Both of these changes were originally part of #9381 Tree-SHA512: af3841c4f0539e0662d81b33c5369fc70aa06ddde1c59cb00fb21c9e4c7d9ff47f1edc5040cb463af1333838802c56b3ef875b939e2b804ee45b8e0294a4371c
2018-03-13Merge #12681: Fix ComputeTimeSmart test failure with -DDEBUG_LOCKORDERMarcoFalke
33eb9071b9 Fix ComputeTimeSmart test failure with -DDEBUG_LOCKORDER (Russell Yanofsky) Pull request description: Failure looks like: ``` Entering test case "ComputeTimeSmart" test_bitcoin: sync.cpp:100: void potential_deadlock_detected(const std::pair<void*, void*>&, const LockStack&, const LockStack&): Assertion `false' failed. unknown location(0): fatal error in "ComputeTimeSmart": signal: SIGABRT (application abort requested) wallet/test/wallet_tests.cpp(566): last checkpoint ``` Reproducible with: ``` ./configure --enable-debug make -C src test/test_bitcoin && src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ComputeTimeSmart ``` Seems to be caused by acquiring `cs_main` inside `CWallet::ComputeTimeSmart` in #11041. I think this may be causing timeouts on travis like: https://travis-ci.org/bitcoin/bitcoin/jobs/353005676#L2692 Tree-SHA512: b263cd122ea9c88204d1d8e7e35291c71ea6319f05114c5009235a75dbd0f669bc0394f44afeed0d9eb08c2a956cd7c08f1ac4ef28616932fef9b43eaac5521b
2018-03-13Support deserializing into temporariesPieter Wuille
Currently, the READWRITE macro cannot be passed any non-const temporaries, as the SerReadWrite function only accepts lvalue references. Deserializing into a temporary is very common, however. See for example things like 's >> VARINT(n)'. The VARINT macro produces a temporary wrapper that holds a reference to n. Fix this by accepting non-const rvalue references instead of lvalue references. We don't propagate the rvalue-ness down, as there are no useful optimizations that only apply to temporaries. Then use this new functionality to get rid of many (but not all) uses of the 'REF' macro (which casts away constness).
2018-03-13Merge READWRITEMANY into READWRITEPieter Wuille