Commit graph

13959 commits

Author SHA1 Message Date
Wladimir J. van der Laan
75142ece6b
Merge #16706: qt: Replace deprecated QSignalMapper by lambda expressions
0912134039 qt: Remove QSignalMapper from TransactionView (Hennadii Stepanov)
9e0c1d676c qt: Remove QSignalMapper from RPCConsole (Hennadii Stepanov)

Pull request description:

  The [`QSignalMapper`](https://doc.qt.io/qt-5/qsignalmapper.html) class has been [deprecated](https://doc-snapshots.qt.io/qt5-5.10/obsoleteclasses.html) since Qt 5.10.

  This PR replaces it by lambdas and does not change behavior.

ACKs for top commit:
  jonasschnelli:
    utACK 0912134039

Tree-SHA512: 0c102d5cab4adc8b6252f72e07123ac87c65434c88cada3e72816ecea8fc4803f15b9c050fb5e1c7e8a96f709265521fd6813ab1890dbf5634032f7ee0d50675
2019-08-29 15:59:29 +02:00
Wladimir J. van der Laan
1f8378508a
Merge #15615: Add log output during initial header sync
d75e704ac0 Add log output during initial header sync (Jonas Schnelli)

Pull request description:

  The non debug log output is completely quiet during the header sync. I see two main reasons to add infos about the state of the initial header sync...
  * users may think the node did fail to start sync
  * it's a little complicate to check if your getting throttled during header sync (repeatedly calling `getchaintips` or similar)

ACKs for top commit:
  fanquake:
    Concept ACK d75e704ac0
  practicalswift:
    utACK d75e704ac0
  laanwj:
    Tested ACK d75e704ac0

Tree-SHA512: 2e738571b703d7251290864603c3a829729645962c2fa3187250bab0585e66a5f01fce892e9b5b98da451fab2b40a2e4784f9b2e5a9cad75ff62c535affe7430
2019-08-29 15:47:26 +02:00
Wladimir J. van der Laan
d20d171f26
Merge #16701: qt: Replace functions deprecated in Qt 5.13
c6dd32da69 qt: Replace obsolete functions of QDesktopWidget (Hennadii Stepanov)
1260ecd812 qt: Add TextWidth() wrapper (Hennadii Stepanov)

Pull request description:

  The following functions are obsolete in Qt 5.13:
  - [`QFontMetrics::width()`](https://doc.qt.io/qt-5/qfontmetrics-obsolete.html#width)
  - [`QDesktopWidget::availableGeometry()`](https://doc.qt.io/qt-5/qdesktopwidget-obsolete.html#availableGeometry)
  - [`QDesktopWidget::screenGeometry()`](https://doc.qt.io/qt-5/qdesktopwidget-obsolete.html#screenGeometry)

  This PR replaces them and does not change behavior.

  Here are some excerpts from the master build log:
  ```
  qt/bitcoingui.cpp: In constructor ‘BitcoinGUI::BitcoinGUI(interfaces::Node&, const PlatformStyle*, const NetworkStyle*, QWidget*)’:
  qt/bitcoingui.cpp:84:57: warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]
           move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
                                                           ^
  In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QDesktopWidget:1:0,
                   from qt/bitcoingui.cpp:43:
  /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qdesktopwidget.h:88:67: note: declared here
       QT_DEPRECATED_X("Use QGuiApplication::screens()") const QRect availableGeometry(int screen = -1) const;
                                                                     ^~~~~~~~~~~~~~~~~
  ```
  ```
  qt/bitcoingui.cpp:1410:74: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
           max_width = qMax(max_width, fm.width(BitcoinUnits::longName(unit)));
                                                                            ^
  In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qwidget.h:50:0,
                   from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qdialog.h:44,
                   from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QDialog:1,
                   from ./qt/optionsdialog.h:8,
                   from ./qt/bitcoingui.h:12,
                   from qt/bitcoingui.cpp:5:
  /home/hebasto/Qt/5.13.0/gcc_64/include/QtGui/qfontmetrics.h:108:9: note: declared here
       int width(const QString &, int len = -1) const;
           ^~~~~
  ```
  ```
  qt/splashscreen.cpp: In constructor ‘SplashScreen::SplashScreen(interfaces::Node&, Qt::WindowFlags, const NetworkStyle*)’:
  qt/splashscreen.cpp:127:50: warning: ‘const QRect QDesktopWidget::screenGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]
       move(QApplication::desktop()->screenGeometry().center() - r.center());
                                                    ^
  In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QDesktopWidget:1:0,
                   from qt/splashscreen.cpp:24:
  /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qdesktopwidget.h:79:67: note: declared here
       QT_DEPRECATED_X("Use QGuiApplication::screens()") const QRect screenGeometry(int screen = -1) const;
                                                                      ^~~~~~~~~~~~~~
  ```

ACKs for top commit:
  jonasschnelli:
    utACK c6dd32da69

Tree-SHA512: deb7bcbf86e1dcc6508bd91288772c2fe8811db79fa2011de37d0469cdd094fbf7fd8c4512c607bed0bd08dc2968e893c0bbc190732c43c69ed1085259df766c
2019-08-29 14:57:06 +02:00
fanquake
b7ff38972c
Merge #16752: doc: Delete stale URL in test README
41d484d5c8 doc: Delete stale URL in test README (Michael Folkson)

Pull request description:

  The resource on the Boost unit test framework previously linked to in src/test/README.md was a stale URL.

  Instead of deleting it, I've replaced it with an alternative resource on the framework on [boost.org](https://www.boost.org/doc/libs/1_45_0/libs/test/doc/html/utf/tutorials.html).

ACKs for top commit:
  promag:
    ACK 41d484d5c8.
  hebasto:
    ACK 41d484d5c8, the removed link is really obsolete.
  fanquake:
    ACK 41d484d5c8 - Thanks.

Tree-SHA512: 764f12548441bde615f77b7a2ca7c5188b4ab936972d16b84960fbd8604d4cbd224415bc59ce839e7e63293aa84fd97f31a69e38734e531231cdb0e148d2e1bd
2019-08-29 19:18:23 +08:00
Wladimir J. van der Laan
aca76b9ee8
Merge #16708: qt: Replace obsolete functions of QSslSocket
2e1455c4a1 Replace obsolete functions of QSslSocket (Hennadii Stepanov)

Pull request description:

  The [`QSslSocket::setDefaultCaCertificates()`](https://doc.qt.io/qt-5/qsslsocket-obsolete.html#setDefaultCaCertificates) and [`QSslSocket::systemCaCertificates()`](https://doc.qt.io/qt-5/qsslsocket-obsolete.html#systemCaCertificates) member functions are [obsolete](https://doc.qt.io/qt-5.12/qsslsocket-obsolete.html) since Qt 5.12.

  This PR replaces them, does not change behavior and keeps compatibility with [Qt 5.5.1](https://github.com/bitcoin/bitcoin/pull/15393).

ACKs for top commit:
  laanwj:
    ACK 2e1455c4a1
  promag:
    ACK 2e1455c4a1.

Tree-SHA512: 4182cd22a3e7a998d62a0fe84e748803a6962a65920b74da9fcf5666a700507468bb6e428054ccb70c2fbb7969a56933f450bc405c7a32ecbc1f8af4c1f983a3
2019-08-29 13:09:51 +02:00
Michael Folkson
41d484d5c8 doc: Delete stale URL in test README 2019-08-29 13:58:00 +03:00
MarcoFalke
93305e6d46
Merge #14879: qt: Add warning messages to the debug window
593ba696fb Add warning messages to the debug window (Hennadii Stepanov)

Pull request description:

  Fix: #11016

  This PR adds warning messages to the debug window in `-disablewallet` mode.

  ![screenshot from 2018-12-06 01-01-27](https://user-images.githubusercontent.com/32963518/49550070-413c1c80-f8f3-11e8-9865-efb49ea8da45.png)

ACKs for top commit:
  jonasschnelli:
    utACK 593ba696fb
  promag:
    ACK 593ba696fb, agree with @Sjors https://github.com/bitcoin/bitcoin/pull/14879#pullrequestreview-196433092 above.
  ryanofsky:
    utACK 593ba696fb

Tree-SHA512: a8ca78529bb16813ba7bfaf5ccd4349189979f08e78ea857746a6fb00fd9d7ed98d8f06f384830acba21dac57070060af23f6be8249398feb32a6efff1333de8
2019-08-28 16:03:09 -04:00
MarcoFalke
a7be1cc92b
Merge #16728: move-only: move coins statistics utils out of RPC
8a3b2eb175 move-only: move coins statistics utils out of RPC (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: #15606
  Issue: #15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal

  ---

  In the short-term, this move-only commit will help with fuzzing (https://github.com/bitcoin/bitcoin/pull/15606#issuecomment-524482297). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots.

  Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it.

ACKs for top commit:
  MarcoFalke:
    ACK 8a3b2eb175, checked --color-moved=dimmed-zebra

Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74
2019-08-27 13:10:45 -04:00
James O'Beirne
8a3b2eb175 move-only: move coins statistics utils out of RPC
These procedures will later be used in the ChainstateManager to compute
statistics (particularly a content hash) for UTXO sets coming in from
snapshots.
2019-08-27 11:51:56 -04:00
Pieter Wuille
92528c260e Support serialization of std::vector<bool> 2019-08-26 11:36:33 -07:00
Hennadii Stepanov
0912134039
qt: Remove QSignalMapper from TransactionView
The QSignalMapper class is obsolete since Qt 5.10.
2019-08-25 09:12:38 +03:00
Hennadii Stepanov
c6dd32da69
qt: Replace obsolete functions of QDesktopWidget 2019-08-25 08:46:32 +03:00
nicolas.dorier
66ad75472f
[Doc] Add documentation for the new whitelist permissions 2019-08-24 23:22:29 +09:00
Hennadii Stepanov
2e1455c4a1
Replace obsolete functions of QSslSocket
The QSslSocket::setDefaultCaCertificates() and 
QSslSocket::systemCaCertificates() member functions are obsolete since 
Qt 5.12.
2019-08-24 15:32:04 +03:00
Hennadii Stepanov
9e0c1d676c
qt: Remove QSignalMapper from RPCConsole
The QSignalMapper class is obsolete since Qt 5.10.
2019-08-24 10:23:24 +03:00
Hennadii Stepanov
1260ecd812
qt: Add TextWidth() wrapper
In Qt 5.12 and before the QFontMetrics::width() is used and it is
deprecated since Qt 13.0.
In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced.
2019-08-23 21:27:50 +03:00
bpay
a4765bd77f
gui: Ensure tx send error highlight is visible
If sending to multiple recipients and one of the recipient fields is malformed,
the highlighted field may not be visible due to being scrolled out of view,
leading to a confusing lack of error feedback when clicking Send. To avoid this
problem ensure the first field containing an error is scrolled into view
when Send is clicked.
2019-08-23 19:20:48 +08:00
Jonas Schnelli
d72758c3f6
Merge #16677: gui: remove unused PlatformStyle::TextColorIcon
bca388db0d gui: remove unused PlatformStyle::TextColorIcon (fanquake)

Pull request description:

  This is unused after #16612.

ACKs for top commit:
  emilengler:
    Concept ACK bca388d
  practicalswift:
    ACK bca388db0d -- diff looks correct & less cruft is better
  hebasto:
    ACK bca388db0d, I have reviewed the code and it looks OK, I agree it can be merge.
  jonasschnelli:
    utACK bca388db0d

Tree-SHA512: ae5c5cfc02cf2e6f138e75e227320f4c430b93bd529a8ead7ba971ceb5bbc997cdb721c6fd8a46a5a897008f0bc6e519422d6beef240b9d2e28ecf4f8cbbcc6a
2019-08-23 11:13:36 +02:00
fanquake
12f7147c89
Merge #16570: tests: Make descriptor tests deterministic
b9ee63c71b Make descriptor test deterministic (David Reikher)

Pull request description:

  This is an improvement to a test, inspired by #14343 - removing non determinism from a test.

  The test `descriptor_test` is non-deterministic, as it relies on the `MaybeUseHInsteadOfApostrophy` function which randomly either swaps all apostrophes with 'h' or doesn't at all in a descriptor. This fix makes both cases always run, if an apostrophe is found in a test descriptor.
  This does not reduce test coverage but removes the non-determinism.

  Additionally, the `MaybeUseHInsteadOfApostrophy` function removed the checksum if found at the end of a descriptor when the apostrophes are swapped by 'h's, since after being swapped the checksum is no longer correct. I instead added re-calculation of the checksum using the `DescriptorChecksum` function, which adds coverage for the case of a descriptors having 'h's instead of apostrophes and a checksum. This was previously lacking.
  To achieve this I had to move `DescriptorChecksum` and `PolyMod` out of the anonymous namespace in descriptor.cpp to make `DescriptorChecksum` accessible in descriptor_tests.cpp.

  All tests complete successfully (functional as well as unit tests).

ACKs for top commit:
  achow101:
    Code Review ACK b9ee63c71b

Tree-SHA512: 992c73a6644a07bfe7c72301ee2666f3c4845a012aaedd7a099a05cea8bdac84fa8280b28e44a7856260c00c0be1a6f1b6768f5694c2a22edf4c489e53fec424
2019-08-23 08:02:35 +08:00
MarcoFalke
52b9797119
Merge #16670: util: Add Join helper to join a list of strings
faebf62714 rpc: Use Join helper in rpc/util (MarcoFalke)
fa8cd6f9c1 util: Add Join helper to join a list of strings (MarcoFalke)

Pull request description:

  We have a lot of enumerations in the code and sometimes those enumerations need to be mentioned in the RPC or command line documentation. Previously, each caller would have a couple of lines inline to join the strings or the joined string is hardcoded in the documentation. A helper to join strings would make code such as https://github.com/bitcoin/bitcoin/pull/16629#discussion_r315852446 less verbose and easier to read.

  Also, warnings commonly accumulate in complex RPCs, since a warning doesn't lead to an early return. A helper to join those warnings would make code such as https://github.com/bitcoin/bitcoin/pull/16394/files#r309324997 less verbose and easier to read.

ACKs for top commit:
  practicalswift:
    ACK faebf62714

Tree-SHA512: 80f2db86a05c63b686f510585c1c631250271a8958fd71fafaac91559ffd2ec25d609bf7d53412ba27f87eff5893ac9dd9c2f296fc0c73581556e1d6a734a36f
2019-08-22 08:41:00 -04:00
fanquake
868a8cea15
Merge #16674: refactor: remove obsolete qt algorithm usage
153d9dd9ac refactor: replace qLowerBound & qUpperBound with std:: upper_bound & lower_bound (fanquake)
59373e3e94 refactor: replace qSort with std::sort (fanquake)
fea33cbbdf refactor: replace qStableSort with std::stable_sort (fanquake)

Pull request description:

  `qStablesort`, `qSort`, `qLowerBound` and `qUpperBound` have been marked as obsolete since at least Qt 5.9: [Obsolete Members for QtAlgorithms](https://doc.qt.io/qt-5.9/qtalgorithms-obsolete.html).

  This pull request replaces their usage with the suggested `std::` replacements.

  This also removes some warning spam when compiling against newer Qt (5.13.0 via brew):
  ```bash
    CXX      qt/libbitcoinqt_a-walletcontroller.o
  qt/transactiontablemodel.cpp:96:52: warning: 'qLowerBound<QList<TransactionRecord>::iterator, uint256, TxLessThan>' is deprecated: Use std::lower_bound [-Wdeprecated-declarations]
          QList<TransactionRecord>::iterator lower = qLowerBound(
  qt/transactiontablemodel.cpp:98:52: warning: 'qUpperBound<QList<TransactionRecord>::iterator, uint256, TxLessThan>' is deprecated: Use std::upper_bound [-Wdeprecated-declarations]
          QList<TransactionRecord>::iterator upper = qUpperBound(
  ```

  ```bash
    CXX      qt/libbitcoinqt_a-moc_walletcontroller.o
  qt/bantablemodel.cpp:64:13: warning: 'qStableSort<QList<CCombinedBan>::iterator, BannedNodeLessThan>' is deprecated: Use std::stable_sort [-Wdeprecated-declarations]
              qStableSort(cachedBanlist.begin(), cachedBanlist.end(), BannedNodeLessThan(sortColumn, sortOrder));
  ```

  ```bash
    CXX      qt/libbitcoinqt_a-sendcoinsentry.o
  qt/recentrequeststablemodel.cpp:205:5: warning: 'qSort<QList<RecentRequestEntry>::iterator, RecentRequestEntryLessThan>' is deprecated: Use std::sort [-Wdeprecated-declarations]
      qSort(list.begin(), list.end(), RecentRequestEntryLessThan(column, order));
  ```

ACKs for top commit:
  hebasto:
    ACK 153d9dd9ac
  promag:
    ACK 153d9dd9ac.
  jonasschnelli:
    utACK 153d9dd9ac

Tree-SHA512: 22f7290ed798ce8b0f5f313405377845d4c8e48dc8687be7464e27fff53363b451a40e9e18910a8c3b4b9d4dcc236a366c92e7d171fcb8576c48f149a1886c26
2019-08-22 18:07:01 +08:00
fanquake
bca388db0d
gui: remove unused PlatformStyle::TextColorIcon
This is unused after #16612.
2019-08-22 14:50:29 +08:00
fanquake
153d9dd9ac
refactor: replace qLowerBound & qUpperBound with std:: upper_bound & lower_bound 2019-08-22 13:43:47 +08:00
fanquake
59373e3e94
refactor: replace qSort with std::sort 2019-08-22 13:42:44 +08:00
fanquake
fea33cbbdf
refactor: replace qStableSort with std::stable_sort 2019-08-22 13:40:51 +08:00
fanquake
01ebaa05a4
Merge #16572: wallet: Fix Char as Bool in Wallet
2dbfb37b40 Fix Char as Bool in interfaces (Jeremy Rubin)

Pull request description:

  In a few places in src/wallet/wallet.h, we use a char when semantically we want a bool.

  This is kind of an issue because it means we can unserialize the same transaction with different fFromMe flags (as differing chars) and evaluate the following section in wallet/wallet.cpp
  ```c++
          if (wtxIn.fFromMe && wtxIn.fFromMe != wtx.fFromMe)
           {
               wtx.fFromMe = wtxIn.fFromMe;
               fUpdated = true;
           }
  ```
  incorrectly (triggering an fUpdated where both fFromMe values represent true, via different chars).

  I don't think this is a vulnerability, but it's just a little messy and unsemantic, and could lead to issues with stored wtxIns not being findable in a map by their hash.

  The serialize/unserialize code for bool internally uses a char, so it should be safe to make this substitution.

  NOTE: Technically, this is a behavior change -- I haven't checked too closely that nowhere is depending on storing information in this char. Theoretically, this could break something because after this change a tx unserialized with such a char would preserve it's value, but now it is converted to a ~true~ canonical bool.

ACKs for top commit:
  achow101:
    Code review ACK 2dbfb37b40
  meshcollider:
    Code review ACK 2dbfb37b40

Tree-SHA512: 8c0dc9cf672aa2276c694facbf50febe7456eaa8bf2bd2504f81a61052264b8b30cdb5326e1936893adc3d33504667aee3c7e207a194c71d87b3e7b5fe199c9d
2019-08-21 15:25:59 +08:00
David Reikher
b9ee63c71b Make descriptor test deterministic
Changed MaybeUseHInsteadOfApostrophy to UseHInsteadOfApostrophe.
This function now always replaces apostrophes with 'h'.
The original Check function was renamed to DoCheck and it's
called with an additional parameter which tells it to either
leave the prv and pub arguments as is or replace the apostrophes
with 'h'. The test runs with apostrophes replaced in prv only,
pub only, prv and pub and without replacement at all. Replacement
of apostrophes in a descriptor and then running DoCheck is conditional
on whether apostrophes are found in that descriptor.

Additionally, instead of dropping the checksum recalculate it
after replacing apostrophes with 'h' in the function UseHInsteadOfApostrophe
using the GetDescriptorChecksum function. That way, this also
introduces an indirect unit test to GetDescriptoChecksum.
2019-08-21 08:22:55 +03:00
MarcoFalke
faebf62714
rpc: Use Join helper in rpc/util 2019-08-20 16:52:33 -04:00
MarcoFalke
fa8cd6f9c1
util: Add Join helper to join a list of strings 2019-08-20 16:51:41 -04:00
MarcoFalke
70b12af87e
Merge #16647: rpc: add weight to getmempoolentry output
17d178fb94 doc: add release-notes for getmempoolentry weight field addition (fanquake)
9c9cc2bd20 qa: Add RPC tests for weight in mempool entry (Daniel Edgecumbe)
54aaa7883c RPC: add weight to mempool entry output (Daniel Edgecumbe)

Pull request description:

  Rebase of #14649 (which itself was a rebase of #11256).

  Squash the two test related commits, and swapped out `size` usage for `vsize`.

  Added a commit with release notes.

ACKs for top commit:
  emilengler:
    Concept ACK 17d178f
  instagibbs:
    utACK 17d178fb94
  meshcollider:
    utACK 17d178fb94

Tree-SHA512: 1d354c9837e0ad0afa40325de9329b9e62688d5eab4d9e1cf9b46d8ae29d08f42d903ab37a41751c2ea8f9034231b21095881b1f5d911cb542b8b06bc85dc7cd
2019-08-20 13:54:42 -04:00
Wladimir J. van der Laan
e00ecb3d7a
Merge #16611: build: Remove src/obj directory from repository
b6e9ff8996 build: Remove src/obj directory from repository (Wladimir J. van der Laan)

Pull request description:

  This directory is automatically created by the build process (in the build target directory, see #16588) and doesn't need to be in the repository nor in the tarballs.

  Move associated ignore directive to top-level `.gitignore` file.

ACKs for top commit:
  hebasto:
    Concept ACK b6e9ff8996

Tree-SHA512: 5f3f5a0e8f19ecf925eb16cab327c3023b8512731bbaad5875828da7a25fdda1b77f6fbd06c002a383913627dc9b552f09ad27c57bcf0cb020ed3b1f506e5fef
2019-08-19 16:17:26 +02:00
MarcoFalke
83112db129
Merge #15864: Fix datadir handling
ffea41f530 Enable all tests in feature_config_args.py (Hennadii Stepanov)
66f5c17f8a Use CheckDataDirOption() for code uniformity (Hennadii Stepanov)
7e33a18a34 Fix datadir handling in bitcoin-cli (Hennadii Stepanov)
b28dada374 Fix datadir handling in bitcoin-qt (Hennadii Stepanov)
50824093bb Fix datadir handling in bitcoind (Hennadii Stepanov)
740d41ce9f Add CheckDataDirOption() function (Hennadii Stepanov)
c1f325126c Return absolute path early in AbsPathForConfigVal (Hennadii Stepanov)

Pull request description:

  Fix #15240, see: https://github.com/bitcoin/bitcoin/issues/15240#issuecomment-487353760
  Fix #15745
  Fix broken `feature_config_args.py` tests (disabled by MarcoFalke@fabe28a0cdcfa13e0e595a0905e3642a960d3077). All test are enabled now.
  This PR is alternative to #13621.

  User's `$HOME` directory is not touched unnecessarily now.

  ~To make reviewing easier only `bitcoind` code is modified (neither `bitcoin-cli` nor `bitcoin-qt`).~

  Refs:
  - https://github.com/bitcoin/bitcoin/issues/15745#issuecomment-479852569 by **laanwj**
  - #16220

Top commit has no ACKs.

Tree-SHA512: 4a4cda10e0b67c8f374da0c9567003d2b566d948e7f8550fe246868b5794c15010e88ea206009480b9cd2f737f310a15e984f920730448f99a895893bed351df
2019-08-19 10:01:30 -04:00
MarcoFalke
1d74693e8a
Merge #16555: doc: mention whitelist is inbound, and applies to blocksonly
20ea9ef6ce [doc] mention whitelist is inbound, and applies to blocksonly (Sjors Provoost)

Pull request description:

  * `-whitelist` only impacts inbound nodes (see #9923). This is obvious in the context of allowing those nodes to connect to you, but there are additional whitelist features where this is less obvious, such as mempool relay behavior.

  * `whitelistrelay` (on by default) explains that `-blocksonly` makes an exception for transactions from whitelisted nodes, but it wasn't documented (nor obvious imo) the other way around. See also https://github.com/bitcoin/bitcoin/pull/15984#issuecomment-490645552

Top commit has no ACKs.

Tree-SHA512: 03e363a5da5d81ad147d1c7e38bf11114df8bb89bdd66fb551520b25f810efa886ec6e649d3b435c4935e0ae4f39bb718bc7bb5778b9de6aa0b71e970a431af8
2019-08-19 09:25:31 -04:00
Wladimir J. van der Laan
ed9a2a37c1
Merge #16631: net: The default whitelistrelay should be true
3b05f0f70f Reformat p2p_permissions.py (nicolas.dorier)
ce7eac3cb0 [Fix] The default whitelistrelay should be true (nicolas.dorier)

Pull request description:

  I thought `whitelistrelay` default was `false` when it is `true`.

  The root of the issue come from the fact that all references to `DEFAULT_` are not in the scope of this file, so hard coding of default values are used everywhere in `net.cpp`. I think that in a separate PR we should fix that more fundamentally everywhere.

ACKs for top commit:
  promag:
    ACK 3b05f0f70f.
  Sjors:
    re-ACK 3b05f0f70f

Tree-SHA512: f4a75f986fa2adf1a5f1c91605e0d261f7ac5ac8535fb05437d83b8392dbcf5cc1a47d755adcf8ad8dc67a88de28060187200fd3ce06545261a5c7ec0fea831a
2019-08-19 11:20:23 +02:00
Daniel Edgecumbe
54aaa7883c
RPC: add weight to mempool entry output 2019-08-19 11:34:10 +08:00
Andrew Chow
787c9ec0c3 Additional tests for other failure cases 2019-08-16 19:34:01 -04:00
Andrew Chow
6e1ae58298 Check error messages in descriptor tests 2019-08-16 19:34:01 -04:00
Andrew Chow
625534d7b1 Give more errors for specific failure conditions
Some failure conditions implicitly fail by failing some other check.
But the error messages are more helpful if they say explicitly what
actually caused the failure, so add those as failure conditions and
errors.
2019-08-16 19:34:01 -04:00
Andrew Chow
c325f619dd Return an error from descriptor Parse that gives more information about what failed 2019-08-16 19:34:01 -04:00
MeshCollider
7a960ba775
Merge #15986: Add checksum to getdescriptorinfo
26d3fad109 Add unmodified-but-with-checksum to getdescriptorinfo (Pieter Wuille)
104b3a5069 Factor out checksum checking from descriptor parsing (Pieter Wuille)

Pull request description:

ACKs for top commit:
  achow101:
    Code Review ACK 26d3fad109
  meshcollider:
    re-Code Review ACK 26d3fad109
  Sjors:
    ACK 26d3fad109

Tree-SHA512: b7a7f89b64a184927d6f9a0c183a087609983f0c5d5593f78e12db4714e930a4af655db9da4b0c407ea2e24d3b926cef6e1f2a15de502d0d1290a6e046826b99
2019-08-17 09:23:52 +12:00
nicolas.dorier
ce7eac3cb0
[Fix] The default whitelistrelay should be true 2019-08-17 00:43:22 +09:00
MarcoFalke
b80cdfec9a
Merge #16618: [Fix] Allow connection of a noban banned peer
d117f4541d Add test for setban (nicolas.dorier)
dc7529abf0 [Fix] Allow connection of a noban banned peer (nicolas.dorier)

Pull request description:

  Reported by @MarcoFalke on https://github.com/bitcoin/bitcoin/pull/16248#discussion_r314026195

  The bug would mean that if the peer connecting to you is banned, but whitelisted without specific permissions, it would not be able to connect to the node.

  The solution is just to move the same line below.

ACKs for top commit:
  Sjors:
    Agree inline is more clear. utACK d117f45
  MarcoFalke:
    ACK d117f4541d

Tree-SHA512: 0fed39acb1e8db67bb0bf4c4de3ad034ae776f38d55bd661f1ae0e1a4c6becaf1824ab46ed8279f2f31df3f4b29ff56461d8b167d3e9cece62cfe58b5a912811
2019-08-16 10:17:25 -04:00
Sjors Provoost
20ea9ef6ce
[doc] mention whitelist is inbound, and applies to blocksonly 2019-08-16 15:58:31 +02:00
MarcoFalke
21a165325e
Merge #16620: util: Move ResolveErrMsg to util/error
fa27c55b05 util: Move ResolveErrMsg to util/error (MarcoFalke)

Pull request description:

  Pull request https://github.com/bitcoin/bitcoin/pull/16248#discussion_r314035862 duplicated the body of this util function. The whole point of the util function is to be shared, so do that here as a fixup to #16248

ACKs for top commit:
  Sjors:
    utACK fa27c55
  ryanofsky:
    utACK fa27c55b05

Tree-SHA512: e2b25ae05082fe9d0ee94bdc7d51f801bd9f78e8fc2b141e9a313e008dbb8a77653fe876e111c802c676859c6b76c37a673d1f8cfbe7ad25607a5ffcffde19fd
2019-08-16 07:53:23 -04:00
Jonas Schnelli
93bacb8cc9
Merge #16612: qt: Remove menu icons
390874c722 qt: Remove menu icons (Wladimir J. van der Laan)

Pull request description:

  Remove the icons from the application menu. Why remove?

  - They are inconsistently applied, some actions had icons, some newer ones don't. Good luck coming up with a sensible icon for everything
  - Menu icons don't seem to have a place in modern UI: for example, GNOME, MacOS have stopped showing these a long time ago (see https://github.com/bitcoin/bitcoin/pull/16584#issuecomment-521195090)
  - Less bikeshedding opportunity about "what should the icon for this be"

  Removed icons:

  ```
  /icons/quit            res/icons/quit.png
  /icons/about           res/icons/about.png
  /icons/about_qt        res/icons/about_qt.png
  /icons/options         res/icons/configure.png
  /icons/key             res/icons/key.png
  /icons/verify          res/icons/verify.png (also .svg)
  /icons/debugwindow     res/icons/debugwindow.png
  /icons/open            res/icons/open.png
  /icons/info            res/icons/info.png
  /icons/filesave        res/icons/filesave.png
  ```
  I checked that these icons are used nowhere else.

  Removed from the menu not removed from the repository, because still referenced by other parts of the code:
  ```
  /icons/lock_closed
  /icons/edit
  /icons/address-book
  /icons/send
  ```

ACKs for top commit:
  practicalswift:
    ACK 390874c722 -- diff looks correct
  l2a5b1:
    ACK 390874c722 - Bitcoin Core has a very simple application menu. As long as the menu items describe their actions clearly and unambiguously then the icons alongside the label are redundant and offer very little value, if anything at all.
  kallewoof:
    ACK 390874c722
  jonasschnelli:
    utACK 390874c722

Tree-SHA512: dd1c52bed3bc6fb9359d5ea1b229a023dafaf813ae640775cbb433b9886bbc11a7d6a4306bac350b26d45fca9b495e4468630f2a32e185570e05f16a3ce45b47
2019-08-16 08:22:54 +02:00
fanquake
0d65106dce
Merge #16383: rpcwallet: default include_watchonly to true for watchonly wallets
72eaab073b tests: functional watch-only wallet tests (William Casarin)
72ffbdc579 doc: add release note for include_watchonly default changes (William Casarin)
003a3c73c0 rpcwallet: document include_watchonly default for watchonly wallets (William Casarin)
a50d9e6c0b rpcwallet: default include_watchonly to true for watchonly wallets (William Casarin)

Pull request description:

  Right now it's a bit annoying to deal with watchonly wallets, many rpc commands have an `include_watchonly` argument that needs to be explicitly set.

  Wallets created with `createwallet` can have a `disable_private_keys` parameter, for those wallets we already know that they are watchonly, so there's no reason to have to explicitly ask for it for every command. Instead we check this wallet flag when the `include_watchonly` parameter isn't set.

ACKs for top commit:
  achow101:
    Code review ACK 72eaab073b
  Sjors:
    ACK 72eaab073b
  promag:
    ACK 72eaab073b, code review only, didn't look closely to the test.
  kallewoof:
    ACK 72eaab073b
  fanquake:
    ACK 72eaab073b - I've looked over the changes, they make sense to me. Compiled and ran the tests etc.

Tree-SHA512: d3646b55e97f386594d7efc994f0712f3888475c6a5dc7f131ac9f8c49bf5d4677182b88f42b34152abe1ad101ecadd152b4c20e9d3c1267190db36f77ab8bd7
2019-08-16 11:55:35 +08:00
fanquake
95a5918c90
Merge #16587: doc: Improve versionbits.h documentation
6576a8765f doc: Improve versionbits.h documentation (Antoine Riard)

Pull request description:

  While reviewing burying of BIP 9 deployments, seen that versionbits.h wasn't that much documented. This is an attempt to improve it. It can be useful, given after burying this code isn't going to be used anymore and isn't straightforward at first sight.

ACKs for top commit:
  jnewbery:
    ACK 6576a8765f
  ajtowns:
    ACK 6576a8765f
  fanquake:
    ACK 6576a8765f

Tree-SHA512: 906463e0b22b988f89d77f798bf94d294f70467d29975088b87384764fb5d0dd1350be67562cc264656f61f1eada2cba20f99c0d797d1d7f90203c269e34c714
2019-08-16 10:52:17 +08:00
MarcoFalke
1bf2ff2bf8
Merge #16060: Bury bip9 deployments
e78aaf41f4 [docs] Add release notes for burying bip 9 soft fork deployments (John Newbery)
8319e738f9 [tests] Add coverage for the content of getblockchaininfo.softforks (James O'Beirne)
0328dcdcfc [Consensus] Bury segwit deployment (John Newbery)
1c93b9b31c [Consensus] Bury CSV deployment height (John Newbery)
3862e473f0 [rpc] Tidy up reporting of buried and ongoing softforks (John Newbery)

Pull request description:

  This hardcodes CSV and segwit activation heights, similar to the BIP 90 buried deployments for BIPs 34, 65 and 66.

  CSV and segwit have been active for over 18 months. Hardcoding the activation height is a code simplification, makes it easier to understand segwit activation status, and reduces technical debt.

  This was originally attempted by jl2012 in #11398 and again by me in #12360.

ACKs for top commit:
  ajtowns:
    ACK e78aaf41f4 ; checked diff to previous acked commit, checked tests still work
  ariard:
    ACK e78aaf4, check diff, run the tests again and successfully activated csv/segwit heights on mainnet as expected.
  MarcoFalke:
    ACK e78aaf41f4 (still didn't check if the mainnet block heights are correct, but the code looks good now)

Tree-SHA512: 7e951829106e21a81725f7d3e236eddbb59349189740907bb47e33f5dbf95c43753ac1231f47ae7bee85c8c81b2146afcdfdc11deb1503947f23093a9c399912
2019-08-15 16:02:10 -04:00
MarcoFalke
85883a9f8e
Merge #16443: refactor: have CCoins* data managed under CChainState
582d2cd747 Cover UTXO set access with lock annotations (James O'Beirne)
5693530685 refactor: have CCoins* data managed under CChainState (James O'Beirne)
fae6ab6aed refactor: pcoinsTip -> CChainState::CoinsTip() (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: #15606
  Issue: #15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/2019-04-proposal/proposal

  ---

  This change encapsulates UTXO set data within CChainState instances, removing global data `pcoinsTip` and `pcoinsviewdb`. This is necessary if we want to maintain multiple chainstates with their own rendering of the UTXO set.

  We introduce a class CoinsViews which consolidates the construction of a CCoins* hierarchy.

  This commit could be broken into smaller pieces, but it would require more ephemeral diffs to, e.g., temporarily change CCoinsViewDB's constructor invocations.

ACKs for top commit:
  Sjors:
    reACK 582d2cd747
  MarcoFalke:
    ACK 582d2cd747

Tree-SHA512: ec9d904fe5dca8cd2dc4b7916daa5d8bab30856dd4645987300f905e0a19f9919fce4f9d1ff03eda982943ca73e6e9a746be6cf53b46510de36e8c81a1eafba1
2019-08-15 12:47:15 -04:00
James O'Beirne
582d2cd747 Cover UTXO set access with lock annotations
i.e. any CoinsViews members. Adds a lock acquisition to `gettxoutsetinfo` RPC
to comply with added annotations.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2019-08-15 11:19:40 -04:00