aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-12-02Merge #17634: qt: Fix comparison function signaturefanquake
98fbd1cdffaa69357091cc67e959ac21119dfa16 Use correct C++11 header for std::swap() (Hennadii Stepanov) b66861e2e5e8a49e11e7489cf22c3007bc7082cc Fix comparison function signature (Hennadii Stepanov) Pull request description: This PR fixes build on CentOS 7 with GCC 4.8.5: ``` ... In file included from /usr/include/c++/4.8.2/algorithm:62:0, from ./serialize.h:11, from ./qt/sendcoinsrecipient.h:13, from ./qt/recentrequeststablemodel.h:8, from qt/recentrequeststablemodel.cpp:5: /usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = QList<RecentRequestEntry>::iterator; _Tp = RecentRequestEntry; _Compare = RecentRequestEntryLessThan]’: /usr/include/c++/4.8.2/bits/stl_algo.h:2296:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = QList<RecentRequestEntry>::iterator; _Compare = RecentRequestEntryLessThan]’ /usr/include/c++/4.8.2/bits/stl_algo.h:2337:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = QList<RecentRequestEntry>::iterator; _Size = int; _Compare = RecentRequestEntryLessThan]’ /usr/include/c++/4.8.2/bits/stl_algo.h:5499:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = QList<RecentRequestEntry>::iterator; _Compare = RecentRequestEntryLessThan]’ qt/recentrequeststablemodel.cpp:208:82: required from here /usr/include/c++/4.8.2/bits/stl_algo.h:2263:35: error: no match for call to ‘(RecentRequestEntryLessThan) (RecentRequestEntry&, const RecentRequestEntry&)’ while (__comp(*__first, __pivot)) ^ In file included from qt/recentrequeststablemodel.cpp:5:0: ./qt/recentrequeststablemodel.h:43:7: note: candidate is: class RecentRequestEntryLessThan ^ qt/recentrequeststablemodel.cpp:217:6: note: bool RecentRequestEntryLessThan::operator()(RecentRequestEntry&, RecentRequestEntry&) const bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const ^ qt/recentrequeststablemodel.cpp:217:6: note: no known conversion for argument 2 from ‘const RecentRequestEntry’ to ‘RecentRequestEntry&’ In file included from /usr/include/c++/4.8.2/algorithm:62:0, from ./serialize.h:11, from ./qt/sendcoinsrecipient.h:13, from ./qt/recentrequeststablemodel.h:8, from qt/recentrequeststablemodel.cpp:5: /usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: error: no match for call to ‘(RecentRequestEntryLessThan) (const RecentRequestEntry&, RecentRequestEntry&)’ while (__comp(__pivot, *__last)) ^ In file included from qt/recentrequeststablemodel.cpp:5:0: ./qt/recentrequeststablemodel.h:43:7: note: candidate is: class RecentRequestEntryLessThan ^ qt/recentrequeststablemodel.cpp:217:6: note: bool RecentRequestEntryLessThan::operator()(RecentRequestEntry&, RecentRequestEntry&) const bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const ^ qt/recentrequeststablemodel.cpp:217:6: note: no known conversion for argument 1 from ‘const RecentRequestEntry’ to ‘RecentRequestEntry&’ CXX qt/qt_libbitcoinqt_a-sendcoinsentry.o make[2]: *** [qt/qt_libbitcoinqt_a-recentrequeststablemodel.o] Error 1 ``` Also for `std::swap()` header `<algorithm>` is replaced with `<utility>` one. Refs: - [`std::swap()`](https://en.cppreference.com/w/cpp/algorithm/swap) - [standard library header `<utility>`](https://en.cppreference.com/w/cpp/header/utility) ACKs for top commit: promag: Code review ACK 98fbd1cdffaa69357091cc67e959ac21119dfa16. jonasschnelli: utACK 98fbd1cdffaa69357091cc67e959ac21119dfa16 fanquake: ACK 98fbd1cdffaa69357091cc67e959ac21119dfa16 Tree-SHA512: 91324490c1bdb98f186d233418e7e72ae7bee507876e94fb8c038bee031cea9e1046900f21156da4b7c33abcd726796867b124c4132d9ae3759877e90a8527db
2019-12-01Merge #17568: wallet: fix when sufficient preset inputs and ↵fanquake
subtractFeeFromOutputs eadd1304c81e0b89178e4cc7630bd31650850c85 tests: Add a test for funding with sufficient preset inputs and subtractFeeFromOutputs (Andrew Chow) ff330badd45067cb520b1cfa1844f60a4c9f2031 Default to bnb_used = false as there are many cases where BnB is not used (Andrew Chow) Pull request description: #17290 introduced a bug where, when we had preset inputs that covered the amount being sent and subtractFeeFrromOutputs was being used, transaction funding would result in a `Fee exceeds maximum configured by -maxtxfee` error. This was happening because we weren't setting `bnb_used = false` when the preset inputs were used as it should have been. This resulted in a too high fee because the change would go to fees accidentally. Apparently this particular case doesn't have a test, so I've added one as well. ACKs for top commit: Sjors: ACK eadd130. I can't get this new test to fail on macOS (without this PR). It passes whether or not I compile with `--enable-debug`. It does fail on Ubuntu. Yay undefined behavior... Anyway, it's a useful test. fanquake: ACK eadd1304c81e0b89178e4cc7630bd31650850c85 instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/17568/commits/eadd1304c81e0b89178e4cc7630bd31650850c85 Tree-SHA512: 7286c321f78666eea558cc591174630d210263594df41cab1065417510591ee514ade0e1d0cec8af09a785757da68de82592b013e8fe8d4966cec3254368706e
2019-11-29Use correct C++11 header for std::swap()Hennadii Stepanov
2019-11-29Fix comparison function signatureHennadii Stepanov
This commit fixes build on CentOS 7 with GCC 4.8.5
2019-11-29Merge #17587: gui: show watch-only balance in send screenSamuel Dobson
4a96e459d733f1b6427221aaa1874ea00f79988a [gui] send: show watch-only balance in send screen (Sjors Provoost) 2689c8fd7159f47248c5fc365463be8b0e8b039c [test] qt: add send screen balance test (Sjors Provoost) Pull request description: Now that we can create a PSBT from a watch-only wallet (#16944), we should also display the watch-only balance on the send screen. Before: <img width="1008" alt="before" src="https://user-images.githubusercontent.com/10217/69533384-030e9180-0f78-11ea-9748-c32c957e822e.png"> After: <img width="1009" alt="Schermafbeelding 2019-11-26 om 11 44 17" src="https://user-images.githubusercontent.com/10217/69622879-19811f80-1042-11ea-8279-091012f39b38.png"> I added a test to check the balance on the send screen, but it only covers regular wallets. A better would add a watch-only only wallet. ACKs for top commit: meshcollider: utACK 4a96e459d733f1b6427221aaa1874ea00f79988a jb55: utACK 4a96e459d733f1b6427221aaa1874ea00f79988a promag: reACK 4a96e45, rebased and label change since last review. instagibbs: code review and light test ACK https://github.com/bitcoin/bitcoin/pull/17587/commits/4a96e459d733f1b6427221aaa1874ea00f79988a Tree-SHA512: 4213549888bd309f72bdbba1453218f4a2b07e809100d786a3791897c75468f9092b06fe4b971942b1c228aa75ee7c04971f262ca9a478b42756e056eb534620
2019-11-28Merge #17624: net: Fix an uninitialized read in ProcessMessage(…, "tx", ↵Wladimir J. van der Laan
…) when receiving a transaction we already have 73b96c94cb6c2afdee7f151768a96944ecaf9d9b net: Fix uninitialized read in ProcessMessage(...) (practicalswift) Pull request description: Fix an uninitialized read in `ProcessMessage(…, "tx", …)` when receiving a transaction we already have. The uninitialized value is read and used on [L2526 in the case of `AlreadyHave(inv) == true`](https://github.com/bitcoin/bitcoin/blob/d8a66626d63135fd245d5afc524b88b9a94d208b/src/net_processing.cpp#L2494-L2526). Proof of concept being run against a `bitcoind` built with MemorySanitizer (`-fsanitize=memory`): ``` $ ./p2p-uninit-read-in-conditional-poc.py Usage: ./p2p-uninit-read-in-conditional-poc.py <dstaddr> <dstport> <net> $ bitcoind -regtest & $ ./p2p-uninit-read-in-conditional-poc.py 127.0.0.1 18444 regtest SUMMARY: MemorySanitizer: use-of-uninitialized-value [1]+ Exit 77 bitcoind -regtest $ ``` Proof of concept being run against a `bitcoind` running under Valgrind (`valgrind --exit-on-first-error`): ``` $ valgrind -q --exit-on-first-error=yes --error-exitcode=1 bitcoind -regtest & $ ./p2p-uninit-read-in-conditional-poc.py 127.0.0.1 18444 regtest ==27351== Conditional jump or move depends on uninitialised value(s) [1]+ Exit 1 valgrind -q --exit-on-first-error=yes --error-exitcode=1 bitcoind -regtest $ ``` Proof of concept script: ``` #!/usr/bin/env python3 import sys from test_framework.mininode import NetworkThread from test_framework.mininode import P2PDataStore from test_framework.messages import CTransaction, CTxIn, CTxOut, msg_tx def send_duplicate_tx(dstaddr="127.0.0.1", dstport=18444, net="regtest"): network_thread = NetworkThread() network_thread.start() node = P2PDataStore() node.peer_connect(dstaddr=dstaddr, dstport=dstport, net=net)() node.wait_for_verack() tx = CTransaction() tx.vin.append(CTxIn()) tx.vout.append(CTxOut()) node.send_message(msg_tx(tx)) node.send_message(msg_tx(tx)) node.peer_disconnect() network_thread.close() if __name__ == "__main__": if len(sys.argv) != 4: print("Usage: {} <dstaddr> <dstport> <net>".format(sys.argv[0])) sys.exit(0) send_duplicate_tx(sys.argv[1], int(sys.argv[2]), sys.argv[3]) ``` Note that the transaction in the proof of concept is the simplest possible, but really any transaction can be used. It does not have to be a valid transaction. This bug was introduced in #15921 ("validation: Tidy up ValidationState interface") which was merged in to `master` 28 days ago. Luckily this bug was caught before being part of any Bitcoin Core release :) ACKs for top commit: jnewbery: utACK 73b96c94cb6c2afdee7f151768a96944ecaf9d9b laanwj: ACK 73b96c94cb6c2afdee7f151768a96944ecaf9d9b, thanks for discovering and reporting this before it ended up in a release. Tree-SHA512: 7ce6b8f260bcdd9b2ec4ff4b941a891bbef578acf4456df33b7a8d42b248237ec4949e65e2445b24851d1639b10681c701ad500b1c0b776ff050ef8c3812c795
2019-11-28Merge #17604: util: make ScheduleBatchPriority advisory onlyWladimir J. van der Laan
d2a3a5cadbe58c0fe363bbc6acac293d41eedf7e util: make ScheduleBatchPriority advisory only (fanquake) Pull request description: ACKs for top commit: laanwj: ACK d2a3a5cadbe58c0fe363bbc6acac293d41eedf7e Tree-SHA512: 14e44360bc6b0c0bfd794cb8a744af7d64fb01aa5602fdb392d6c54799a721ef04426e8379b157dd40f2a33c0b6a5248b09d59c865c453ff1f6e3abbafff524e
2019-11-27net: Fix uninitialized read in ProcessMessage(...)practicalswift
2019-11-26Default to bnb_used = false as there are many cases where BnB is not usedAndrew Chow
2019-11-26Merge #17283: rpc: improve getaddressinfo test coverage, help, code docsWladimir J. van der Laan
33f5fc32e5bfbe1e89c4d20ce455bcc6dc194151 test: add rpc getaddressinfo labels test coverage (Jon Atack) 0f3539ac6d772fc646b5f184fa1efe77bf632f6a test: add listlabels test in wallet_labels.py (Jon Atack) 1388de83900eaced906d369fe9e8887ae74b2dcf rpc: add getaddressinfo code documentation (Jon Atack) 2ee0cb3330ccf70f0540cb42370796e32eff1569 rpc: update getaddressinfo RPCExamples to bech32 (Jon Atack) 8d1ed0c263f8cdff7189f02040b5d02238d93da0 rpc: clarify label vs labels in getaddressinfo RPCHelpman (Jon Atack) 5a0ed850700dfb19167d40b38f80313bd5e427ca rpc: improve getaddressinfo RPCHelpman content (Jon Atack) 70cda342cd20d0e0cd9f28405457544036968f2d rpc: improve getaddressinfo RPCHelpman formatting (Jon Atack) Pull request description: This PR is a continuation of the work in https://github.com/bitcoin/bitcoin/pull/12892. Main motivations: - There is currently no test coverage for the getaddressinfo `labels` response. Coverage here is a prerequisite before deprecating the `label` response or adding multiple labels per address. - `bitcoin-cli help getaddressinfo` returns a few content errors, difficult-to-read formatting, and no explanation why it returns both `label` and `labels` and how they relate, which can be confusing for application developers. Changes by order of commits: - [x] improve/fix getaddressinfo RPCHelpman layout formatting - [x] improve/fix getaddressinfo RPCHelpman content - [x] clarify the `label` and `labels` fields in getaddressinfo RPCHelpman - [x] update getaddressinfo RPCExamples addresses to bech32 - [x] add getaddressinfo code docs - [x] add a `listlabels` test assertion in wallet_labels.py - [x] add missing getaddressinfo `labels` test coverage and improve the existing `label` tests Here are gists of the CLI help output: [`bitcoin-cli help getaddressinfo` before this PR](https://gist.github.com/jonatack/022af5221a85c069780359a22643c810) [`bitcoin-cli help getaddressinfo` after this PR](https://gist.github.com/jonatack/4ee5f6abc62a3d99269570206a5f90ba) It seems we ought to begin a deprecation process for the getaddressinfo `label` field? If yes, I have a follow-up ready. _--> EDIT: Deprecation follow-ups #17578 and #17585 now build on this PR._ ACKs for top commit: fjahr: Re-ACK 33f5fc32e5bfbe1e89c4d20ce455bcc6dc194151 jnewbery: ACK 33f5fc32e5bfbe1e89c4d20ce455bcc6dc194151. Tree-SHA512: a001aa863090ec2566a31059477945b1c303ebeb430b33472f8b150e420fa5742fc33bca9d95571746395b607f43f6078dd5b53e238ac1f3fc648b51c8f79a07
2019-11-26Merge #17567: gui: remove macOS start on login codefanquake
27d82b63fb8869716d2f103fd381c2413bde4d1b gui: remove macOS start on login code (fanquake) Pull request description: The macOS startup item code was disabled for builds targeting macOS > `10.11` in #15208. Now that we require macOS `10.12` as a minimum (#17550), we can remove the startup item code entirely. The API we were using, `LSSharedFileListItemCopyResolvedURL`, `LSSharedFileListCopySnapshot` etc, was removed in macOS `10.12` SDK. ACKs for top commit: jonasschnelli: utACK 27d82b63fb8869716d2f103fd381c2413bde4d1b jonasschnelli: Tested ACK 27d82b63fb8869716d2f103fd381c2413bde4d1b - successfully compiled on 10.15.1 Tree-SHA512: 7420757b91c7820e6a63280887155394547134a9cebcf3721af0284da23292627f94cd431241e033075b3fd86d79ace3ebf1b25d17763acbf71e07a742395409
2019-11-26util: make ScheduleBatchPriority advisory onlyfanquake
2019-11-26Merge #17606: qt, refactor: Use proper classes for Ui::*fanquake
93352d261fa4e1518a4f006de157ff5a2fc4c819 qt: Use proper class for Ui::ReceiveCoinsDialog (Hennadii Stepanov) 87819046432a24fa8a7ec5c115eae4df0d281245 qt: Fix class name of Ui::ModalOverlay (Hennadii Stepanov) Pull request description: Use proper classes for: - `Ui::ModalOverlay` to remove `<customwidget>` entry - `Ui::ReceiveCoinsDialog` to be consistent with the code base This PR does not change behavior. ACKs for top commit: jonasschnelli: Tested ACK 93352d261fa4e1518a4f006de157ff5a2fc4c819 - ran this on top of master and tested the modal overlay on initial mainnet sync. laanwj: code review ACK 93352d261fa4e1518a4f006de157ff5a2fc4c819 Tree-SHA512: faeed8e86dbf5355505defcdb7e1db07d6a6005ee5eb07367b00f6aa122dd8ad34f8372d4bae7b29c0eac87b538a33157e19328be2876135e8a6376a3197f1bc
2019-11-26[gui] send: show watch-only balance in send screenSjors Provoost
2019-11-26[test] qt: add send screen balance testSjors Provoost
2019-11-26qt: Use proper class for Ui::ReceiveCoinsDialogHennadii Stepanov
2019-11-26qt: Fix class name of Ui::ModalOverlayHennadii Stepanov
2019-11-24rpc: add getaddressinfo code documentationJon Atack
and separate the fields with a line break for readability.
2019-11-24rpc: update getaddressinfo RPCExamples to bech32Jon Atack
2019-11-24rpc: clarify label vs labels in getaddressinfo RPCHelpmanJon Atack
2019-11-24rpc: improve getaddressinfo RPCHelpman contentJon Atack
2019-11-24wallet: replace raw pointer with const reference in AddrToPubKeyHarris
2019-11-24rpc: improve getaddressinfo RPCHelpman formattingJon Atack
2019-11-24Merge #17527: Fix CPUID subleaf iterationWladimir J. van der Laan
f93fc61c65d605eae2d3e2c98bdd30ae587fcdab Put bounds on the number of CPUID leaves explored (Pieter Wuille) ba2c5fe1477cec80d7e02f824daba21a1021758e Fix CPUID subleaf iteration (Pieter Wuille) Pull request description: This fixes #17523. The code to determine which CPUID subleaves to explore was incorrect in #17270. The new code here is based on Intel's reference documentation for CPUID (a document called "Intel® Processor Identification and the CPUID Instruction - Application Note 485", which I cannot actually find on their own website). ACKs for top commit: laanwj: ACK f93fc61c65d605eae2d3e2c98bdd30ae587fcdab jonatack: ACK f93fc61c65d605eae2d3e2c98bdd30ae587fcdab code review, tested rebased on current master bb862d7 with Debian 4.19 x86_64 mzumsande: ACK f93fc61, reviewed code and compared with the intel doc, tested on an AMD and an Intel processor. Tree-SHA512: 2790b326fa397b736c0f39f25807bea57de2752fdd58bf6693d044b8cb26df36c11cce165a334b471f8e33724f10e3b76edab5cc4e0e7776601aabda13277245
2019-11-23refactor: Nuke coincontrol circular dependencyHennadii Stepanov
2019-11-22gui: remove macOS start on login codefanquake
The macOS startup item code was disabled for builds targeting macOS > 10.11 in #15208. Now that we require macOS 10.12 as a minimum, #17550, we can remove the startup item code entirely, as the API we were using was removed in macOS 10.12.
2019-11-23Merge #17447: wallet: Make -walletdir network onlySamuel Dobson
3c2c439dcd8797019ac6d6614775d5c20ee41c36 wallet: Make -walletdir network only (João Barbosa) Pull request description: With this PR `bitcoind -regtest` doesn't run if bitcoin.conf has ``` walletdir=/mnt/mydisk/wallets ``` But works with ``` [regtest] walletdir=/mnt/mydisk/wallets ``` Doesn't change mainnet behavior. Closes #15630. ACKs for top commit: ryanofsky: ACK 3c2c439dcd8797019ac6d6614775d5c20ee41c36 MarcoFalke: ACK 3c2c439dcd8797019ac6d6614775d5c20ee41c36 🍈 meshcollider: Tested ACK 3c2c439dcd8797019ac6d6614775d5c20ee41c36 Tree-SHA512: 8ab3b2db5f3f9cab78b36baaf490c80f7330372cfd8f73fe6536c8fb4c6e55e09f62296feb70617075838b3bcd7101abebbef3b228b6c3dbd42ce8c7a5c372d9
2019-11-23Merge #17553: wallet: Remove out of date comments for ↵Samuel Dobson
CalculateMaximumSignedTxSize 6a2e6b0600077e5903400dc74bc8b0c26592fde6 Remove out of date comments for CalculateMaximumSignedTxSize (Gregory Sanders) Pull request description: These paths can be hit for probably a number of reasons, and ISMINE spendability is not a requirement to call it. For example: During watch-only transaction creation, previous transaction in wallet, pubkey imported, but not the witnessscript associated with the prevout. In this case I think no/minimal comment is better than specific and soon to be out of date. ACKs for top commit: achow101: ACK 6a2e6b0600077e5903400dc74bc8b0c26592fde6 darosior: ACK 6a2e6b0600077e5903400dc74bc8b0c26592fde6 Tree-SHA512: ad4c26fd2409eb5aed19d67c19cb5479d226bd11e9298630309c4344f6562ace2e10c2850ebe22770331d71e91320a606e79619b9fe52dd478ce1f589a740122
2019-11-23Merge #17237: wallet: LearnRelatedScripts only if KeepDestinationSamuel Dobson
3958295bc8a3787b66b0269190218a3764088f79 wallet: LearnRelatedScripts only if KeepDestination (João Barbosa) 55295fba4cbff36e9a8c3fed9c38e82ebe3c48b7 wallet: Lock address type in ReserveDestination (João Barbosa) Pull request description: Only mutates the wallet if the reserved key is kept. First commit is a refactor that makes the address type a class member. The second commit moves `LearnRelatedScripts` from `GetReservedDestination` to `KeepDestination` to avoid an unnecessary call to `AddCScript` - which in turn prevents multiple entries of the same script in the wallet DB. ACKs for top commit: achow101: Re-ACK 3958295bc8a3787b66b0269190218a3764088f79 Sjors: ACK 3958295bc8a3787b66b0269190218a3764088f79 ryanofsky: Code review ACK 3958295bc8a3787b66b0269190218a3764088f79. I like this change. The new behavior makes more sense, and the change makes the code clearer, since the current LearnRelatedScripts call is hard to understand and explain. (Personally, I'd like it if this PR were merged before #17373 or that PR was rebased on top of this one so it would be less confusing.) meshcollider: utACK 3958295bc8a3787b66b0269190218a3764088f79 Tree-SHA512: 49a5f4b022b28042ad37ea309b28378a3983cb904e234a25795b5a360356652e0f8e60f15e3e64d85094ea63af9be01812d90ccfc08ca4f1dd927fdd8566e33f
2019-11-23Merge #16944: gui: create PSBT with watch-only walletSamuel Dobson
c6dd565c8820aa8a98b190621e10c6e2821a9ecc [gui] watch-only wallet: copy PSBT to clipboard (Sjors Provoost) 39465d545d521e66bb3accfa788aa94bffaf47eb [wallet] add fillPSBT to interface (Sjors Provoost) 848f88920853724511387ca0b7ef652fa14ced71 [gui] send: include watch-only (Sjors Provoost) 40537f090907f81ba885edb7dff1558382976912 [wallet] ListCoins: include watch-only for wallets without private keys (Sjors Provoost) Pull request description: For wallets with `WALLET_FLAG_DISABLE_PRIVATE_KEYS` this makes the watch-only balance available on the send screen (including coin selection). Instead of sending a transaction it generates a PSBT. The user can take this PSBT and process it with [HWI](https://github.com/bitcoin-core/HWI) or put it an SD card for hardware wallets that support that. The PSBT is copied to the clipboard. This was the easiest approach; we can add a dialog later to display it, as well as an option to save to disk. ACKs for top commit: instagibbs: test and code review ACK https://github.com/bitcoin/bitcoin/pull/16944/commits/c6dd565c8820aa8a98b190621e10c6e2821a9ecc meshcollider: re-ACK c6dd565c8820aa8a98b190621e10c6e2821a9ecc Tree-SHA512: ebc3da0737e33b255ed926191b84569aedb6097d14868662bd5dce726ce3048e86e9a31eba987b10dffe1482b35c21ae1cd595c2caa4634bc4cf78a826a83852
2019-11-23Merge #17371: Refactor: Require scriptPubKey to get wallet SigningProviderSamuel Dobson
d0dab897afaac0a18aa47d3ce673a4a43a69178a Refactor: Require scriptPubKey to get wallet SigningProvider (Andrew Chow) 4b0c718f8f48c678cbe4575e9a9cf9e62a30f0da Accumulate result UniValue in SignTransaction (Andrew Chow) Pull request description: Easier to review ignoring whitespace: git log -p -n1 -w This commit does not change behavior. It passes new CScript arguments to signing functions, but the arguments aren't currently used. Split from #17261 ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/17371/commits/d0dab897afaac0a18aa47d3ce673a4a43a69178a ryanofsky: Code review ACK d0dab897afaac0a18aa47d3ce673a4a43a69178a. Thanks for the SignTransaction update. No other changes since last review Sjors: Code review ACK d0dab897afaac0a18aa47d3ce673a4a43a69178a promag: Code review ACK d0dab897afaac0a18aa47d3ce673a4a43a69178a. meshcollider: Code review ACK d0dab897afaac0a18aa47d3ce673a4a43a69178a Tree-SHA512: c3f52df20fd9d6b3b5aa65562cf5f7dce7b7f44c148b0f988f8b578fce2a28e9b7bf010f5f04bb5bf60f5272b2899f1dbbfb8aee81579c21c9cba559d1d2bb70
2019-11-23Merge #17290: Enable BnB coin selection for preset inputs and subtract fee ↵Samuel Dobson
from outputs b007efdf1910db1d38671d6435d2f379bbf847d2 Allow BnB when subtract fee from outputs (Andrew Chow) db15e71e79b24601853703bebd1c92f4b523fd5f Use BnB when preset inputs are selected (Andrew Chow) Pull request description: Currently we explicitly disable BnB when there are preset inputs selected or when the subtract fee from outputs option is enabled. This PR enables BnB for both cases. Kind of an alternative to #17246 (implements the subtract fee from outputs part of it) and borrows a test from there too. ACKs for top commit: instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/17290/commits/b007efdf1910db1d38671d6435d2f379bbf847d2 Sjors: re-ACK b007efdf1910db1d38671d6435d2f379bbf847d2 Tree-SHA512: 933276b09b2fa2ab43db7f0b98762f06f6f5fa8606195f96aca9fa1cb71ae4ee7156028dd482b1cada82ddd0996a9daf12ea5c152589fdf192cd96cbc51e99df
2019-11-22Merge #14384: Fire TransactionRemovedFromMempool callbacks from mempoolWladimir J. van der Laan
e20c72f9f076681def325b5b5fa53bccda2b0eab Fire TransactionRemovedFromMempool from mempool (251) Pull request description: This pull request fires TransactionRemovedFromMempool callbacks from the mempool and cleans up a bunch of code. It also resolves the `txmempool -> validation -> validationinterface -> txmempool` circular dependency. Ideally, `validationinterface` is a dumb component that doesn't have any knowledge of the sub-systems it sends its notifications to. The commit that aims to resolve this circular dependency by moving `txmempool` specific code out of `validationinterface` to `txmempool` where it belongs. ACKs for top commit: jnewbery: ACK e20c72f9f076681def325b5b5fa53bccda2b0eab Tree-SHA512: 354c3ff1113b21a0b511d80d604edfe3846dddae3355e43d1387f68906e54bf5dc01e7c029edc0b8e635b500b2ab97ee50362e2486eb4319f7347ee9a9e6cef3
2019-11-22Merge #17542: build: Create test utility library from src/test/util/MarcoFalke
a2e581de942ece85b84c4f5a15287654b02867cb build: Create test utility library from src/test/util/ (Harris) Pull request description: This PR creates a static **test utility library** that replaces repetitive compilations of sources from *src/test/util* in **unit**, **gui** and **bench** **tests**. The original issue is here: https://github.com/bitcoin/bitcoin/issues/17401 The changes are: * a new *Makefile.test_util.include* * a new entry in *Makefile.am* that includes *Makefile.test_util.include* when testing is enabled * removal of all *src/test/util* headers & sources from unit, gui and bench Makefiles * addition of *libtest_util.a* at LDADD's of every test ACKs for top commit: MarcoFalke: ACK a2e581de942ece85b84c4f5a15287654b02867cb 🍞 Tree-SHA512: d172127a26ee70d16625e17d7d94337a65472c57bb97f910c357c52d3dc082ea478ee586ee9074d9ebfeb05b75027e5e15f5bcd2aa35962dadfd9ac6bfd55ab9
2019-11-22Merge #17519: rpc: Remove unused COINBASE_FLAGSWladimir J. van der Laan
e9a27cf338dc618b8ecab8984abc54d588de8a05 refactor: Remove unused COINBASE_FLAGS (Neha Narula) Pull request description: Commit d449772cf69c01932fc5d72c46054815d6300b3c stopped setting COINBASE_FLAGS, and it looks like it hasn't been used since P2SH. Following up on #17489, remove COINBASE_FLAGS which is unused. I verified that removing this did not change the contents of the coinbase's scriptSig. ACKs for top commit: laanwj: ACK e9a27cf338dc618b8ecab8984abc54d588de8a05 MarcoFalke: ACK e9a27cf338dc618b8ecab8984abc54d588de8a05 💻 Tree-SHA512: f9dac124ce7e3edcae974137764bb5039387b1b123b86af44486e398aa4a8d91a9ecf640e207b364ae303acbbaee7cca300d303ea3d6869ba9cae2bf555a6334
2019-11-21build: Create test utility library from src/test/util/Harris
2019-11-21Fire TransactionRemovedFromMempool from mempool251
This commit fires TransactionRemovedFromMempool callbacks from the mempool and cleans up a bunch of code.
2019-11-21Remove out of date comments for CalculateMaximumSignedTxSizeGregory Sanders
2019-11-21Merge #17513: refactor, qt: Nuke some circular dependenciesWladimir J. van der Laan
5f50599ae7077ae9b9b56edb8892387b6ddc460a refactor: Cleanup headers from walletmodel.h (Hennadii Stepanov) a53e9895db7617c879858ca27e38e6aaf35f6075 refactor: Nuke walletmodel circular dependency (Hennadii Stepanov) 49c4211c0435e3b27c8107a332de22e9cad84390 refactor: Nuke walletmodeltransaction circular dep (Hennadii Stepanov) 567cb44eb95785c8df93a3844207d17f4c390372 refactor: Nuke guiutil circular dependency (Hennadii Stepanov) 73b5505cfe0a8583718c708f7a99762c29d81274 refactor: Move SendCoinsRecipient in own header (Hennadii Stepanov) Pull request description: This PR gets rid of the following circular dependencies: - `qt/guiutil` -> `qt/walletmodel` -> `qt/optionsmodel` -> `qt/guiutil` - `qt/walletmodel` -> `qt/walletmodeltransaction` -> `qt/walletmodel` - `qt/paymentserver` -> `qt/walletmodel` -> `qt/paymentserver` ACKs for top commit: Sjors: ACK 5f50599ae7077ae9b9b56edb8892387b6ddc460a instagibbs: code review ACK 5f50599ae7077ae9b9b56edb8892387b6ddc460a practicalswift: ACK 5f50599ae7077ae9b9b56edb8892387b6ddc460a -- diff looks correct promag: ACK 5f50599ae7077ae9b9b56edb8892387b6ddc460a. Tree-SHA512: 070686ac82b5c68c3ef1b8b4c16b4b916b84d80d1e92e42287fdd9454671bea54779c0d2db4db623750aaaf180beaba212137190d6a427113905e2c4be5c60c5
2019-11-21Merge #17407: node: Add reference to mempool in NodeContextMarcoFalke
fa538813b1c382cf135cbf2a0cc3fa01f36964d8 scripted-diff: Replace ::mempool with m_node.mempool in tests (MarcoFalke) 8888ad02e204b0fa7a2ea2cfed2fc3f298cf1623 test: Replace recursive lock with locking annotations (MarcoFalke) fac07f2038a3ccd5edadc6e6122c02fa30e697bd node: Add reference to mempool in NodeContext (MarcoFalke) Pull request description: This is the first step toward making the mempool a global that is not initialized before main. #### Motivation Currently the mempool is a global that is initialized before the `main` function. This is confusing and easy to get wrong. E.g. the mempool constructor queries state that has not been initialized, like randomness (fixed), or command line arguments (not an issue last time I checked). Also without having the chainstate (chain tip) initialized first, it doesn't make conceptually sense to have a mempool, since the mempool builds txs on top of the utxo set (chain tip). Finally, in the future someone might want to run a consensus-only full node (`-nowallet -noblockfilter -no... -nomempool` command line options) that only verifies blocks and updates the utxo set. This is conceptually the same change that has already been done for the connection manager `CConnman`. ACKs for top commit: jnewbery: utACK fa538813b1c382cf135cbf2a0cc3fa01f36964d8 ariard: Tested ACK fa53881. Tree-SHA512: 2c446a8a51476354aad7126c2b833500d36b24490caa94f847b2bdc622054de0dae28980f23e3d91b1b492dc32931656d98dbd019af9e4e58f2f8c5375aac694
2019-11-21Merge #17439: refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE constants ↵MarcoFalke
consistently cb9d830a00995ee60e71780c04f6193efd02c511 test: Use proper MAX_SCRIPT_ELEMENT_SIZE (Hennadii Stepanov) 402ee706d8afab3d8d883cd15a660740fcebeb55 refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE const (Hennadii Stepanov) Pull request description: This PR replaces well-known "magic" numbers with proper `MAX_SCRIPT_ELEMENT_SIZE` constants. ACKs for top commit: practicalswift: ACK cb9d830a00995ee60e71780c04f6193efd02c511 -- diff looks correct and change appears to be complete instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/17439/commits/cb9d830a00995ee60e71780c04f6193efd02c511 Tree-SHA512: 5fa033275d6df7e35962c38bfdf09a7b5cd7ef2ccdd5e30a39ba47d0c21ac779a5559c23f5ef5bfd4293be0fc639e836a308bbedf0e34717e1eead983b389bbd
2019-11-20refactor: Remove unused COINBASE_FLAGSNeha Narula
Commit d449772cf69c01932fc5d72c46054815d6300b3c stopped setting COINBASE_FLAGS, and it looks like it hasn't been used since P2SH. Update the help string to remove "flags", which is not specified in BIP 22.
2019-11-20Merge #17444: wallet: Avoid showing GUI popups on RPC errors (take 2)MarcoFalke
faffa7f0dcc9971cb20534816eccdf75bebc853a wallet: Avoid showing GUI popups on RPC errors (take 2) (MarcoFalke) Pull request description: Commit 8b0d82bb428de9e7f1da7c61574e7a8376a62d43 claims "This commit does not change behavior." However, it re-introduced the bug I tried to fix in #17070 ACKs for top commit: ryanofsky: Code review ACK faffa7f0dcc9971cb20534816eccdf75bebc853a Tree-SHA512: 99987f80c76414dca40c7d76b2fe4ea853debbe3c49e7acdeab2596c726a2935c468f4484d49212e65ecc9c8b0d861c0c2b83c1ddfc07670540699199dbfecb0
2019-11-20Put bounds on the number of CPUID leaves exploredPieter Wuille
2019-11-20Allow BnB when subtract fee from outputsAndrew Chow
2019-11-20Use BnB when preset inputs are selectedAndrew Chow
2019-11-20Merge #16161: util: Fix compilation errors in support/lockedpool.cppfanquake
30fb598737f6efb7802d707a1fa989872e7f8b7b Fix segfault in allocator_tests/arena_tests (Jeffrey Czyz) 15c84f53f47bf6e6a9c4c9dfe50c78d98f7ec07f Define ARENA_DEBUG in Travis test runs (Jeffrey Czyz) ad715488222f2f2ce2e2cff632eae94fd49ea9c5 Fix compilation errors in support/lockedpool.cpp (Jeffrey Czyz) Pull request description: Changes in #12048 cause a compilation error in Arena::walk() when ARENA_DEBUG is defined. Specifically, Arena's chunks_free map was changed to have a different value type. Additionally, missing includes cause other compilation errors when ARENA_DEBUG is defined. Reproduced with: make CPPFLAGS=-DARENA_DEBUG ACKs for top commit: laanwj: ACK 30fb598737f6efb7802d707a1fa989872e7f8b7b fanquake: ACK 30fb598737f6efb7802d707a1fa989872e7f8b7b - thanks for following up jkczyz. Tree-SHA512: 4eec368a4e9c67e4e2a27bc05608a807c2892d50c60d06ed21490cd274c0369f9671bc05b3006acc2a193316caf4896454c9c299603bfed29bd488f1987ec446
2019-11-20Merge #17446: gui: Changed tooltip for 'Label' & 'Message' text fields to be ↵Wladimir J. van der Laan
more clear 8944c1d340ac2be45b505ada7e187b770b0b036f Changed tooltips of receive form to highlight difference between Label and Message (dannmat) Pull request description: I have changed the tooltips for 'Label' & 'Message' text fields to be more clear, stating the difference between the two (#17173) ACKs for top commit: MarcoFalke: ACK 8944c1d340ac2be45b505ada7e187b770b0b036f laanwj: ACK 8944c1d340ac2be45b505ada7e187b770b0b036f Tree-SHA512: 7fbea4d3c4416264ae6c146d51d29958c418a278bdd6744133db0b684ad7a9413178c005592aa21a81d127f3f3a8583fc5de00078239db08e6f101f657a5dd3a
2019-11-20Merge #12461: scripted-diff: Rename key size consts to be relative to their ↵Wladimir J. van der Laan
class 0580f86bb48004b797d4cb6273e7ffee0b0a0584 Fixup whitespace (Ben Woosley) 47101bbb27d0e13ea2b40ce1c7ff0dba9030f369 scripted-diff: Rename CPubKey and CKey::*_KEY_SIZE and COMPRESSED_*_KEY_SIZE (Ben Woosley) Pull request description: ~~And introduce CPubKeySig to host code relative to key sigs.~~ ACKs for top commit: meshcollider: utACK https://github.com/bitcoin/bitcoin/pull/12461/commits/0580f86bb48004b797d4cb6273e7ffee0b0a0584 Tree-SHA512: 29aa0be54912358b138e391b9db78639786f56580493e590ec9f773c0e1b421740133d05a79be247c7ee57e71c9c9e41b9cb54088cb3c0e3f813f74f0895287b
2019-11-19Fix CPUID subleaf iterationPieter Wuille