From 0883abc4c72854a88d313021478025d9a039035c Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 1 Dec 2020 11:26:59 +0100 Subject: [PATCH 01/20] Merge #20496: build: Drop unneeded macOS framework dependencies ec4a46dd9c158e1a0de144e9abb260da941aa702 build: Drop unneeded IOKit framework dependency (Hennadii Stepanov) 65afe4cb69e80278de0f584b6eeb6741f02a31eb build: Drop unneeded ApplicationServices framework dependency (Hennadii Stepanov) Pull request description: Bitcoin Core codebase does not contain direct dependencies on the `ApplicationServices` and `IOKit` frameworks. ACKs for top commit: jonasschnelli: utACK ec4a46dd9c158e1a0de144e9abb260da941aa702 practicalswift: cr ACK ec4a46dd9c158e1a0de144e9abb260da941aa702: patch looks correct! promag: Tested ACK ec4a46dd9c158e1a0de144e9abb260da941aa702 (not depends build). Tree-SHA512: 47b5ad87d761992850133a921f07d485565c70ba2909a3289050f406e6dbd39ad49e1aeeb6cad79c6914385a72ddffd273dfadd69259a35545a13cd17d0e5043 --- build-aux/m4/bitcoin_qt.m4 | 3 +-- src/qt/notificator.cpp | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 1d7626ab6a..4db21b6ff4 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -124,7 +124,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static]) AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb]) elif test "x$TARGET_OS" = xdarwin; then - AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)]) _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa]) AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa]) fi @@ -210,7 +209,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ *darwin*) BITCOIN_QT_CHECK([ MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC" - base_frameworks="-framework Foundation -framework ApplicationServices -framework AppKit" + base_frameworks="-framework Foundation -framework AppKit" AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)]) ]) ;; diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index bed85e5e73..5fd9d840aa 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -17,12 +17,7 @@ #include #include #endif -// Include ApplicationServices.h after QtDbus to avoid redefinition of check(). -// This affects at least OSX 10.6. See /usr/include/AssertMacros.h for details. -// Note: This could also be worked around using: -// #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #ifdef Q_OS_MAC -#include #include #endif From 53064c45596092cccc315aaa521713fdb007e89c Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 4 Dec 2020 22:11:27 +0800 Subject: [PATCH 02/20] Merge #20565: Android : Ensure pic build for bdb e373959d6fe90cc4507024a6b31a706bfc5bd0c8 Android : Ensure pic build for bdb (Block Mechanic) Pull request description: This pr ensures android builds for the BDB dependency have the pic flag enabled. Android builds were failing to link with reloc errors. ACKs for top commit: laanwj: Code review ACK e373959d6fe90cc4507024a6b31a706bfc5bd0c8 jonasschnelli: utACK e373959d6fe90cc4507024a6b31a706bfc5bd0c8 Tree-SHA512: 68319ed7cc0bd295eaa87dd53ba051daeb1456bc3ab9b48ca0c4b831a9c8da1073480478efde73689f0e403e37409a8459229264656f05ba5fef6c257a74f977 --- depends/packages/bdb.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index b50c0b52b4..bdeb2388bd 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -9,6 +9,7 @@ define $(package)_set_vars $(package)_config_opts=--disable-shared --enable-cxx --disable-replication $(package)_config_opts_mingw32=--enable-mingw $(package)_config_opts_linux=--with-pic +$(package)_config_opts_android=--with-pic $(package)_cflags+=-Wno-error=implicit-function-declaration $(package)_cxxflags=-std=c++11 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE From 9ff3643bfa929155493851094824f03c1cb79f49 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 7 Dec 2020 10:07:43 +0100 Subject: [PATCH 03/20] Merge #20482: Add depends qt fix for ARM macs c23f6f84efa2fe7e7168a5d41341f3a7c5598f70 Add depends qt fix for ARM macs (Jonas Schnelli) Pull request description: With this, depends builds fine on macOS 11 on an Apple Silicon Mac (ARM64). ACKs for top commit: laanwj: Code review ACK c23f6f84efa2fe7e7168a5d41341f3a7c5598f70 Tree-SHA512: a8354cec99969cff9e7dab150c335050ddb4b3c93a9f12a4db5e8046f02b11ce692ac17c2b96cbbe7f380c1aa110b15b8d6d48d51bc9c560282c702e99fd8a8d --- depends/packages/qt.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 33b5b623b8..44e9e6fd15 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -84,6 +84,9 @@ $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION) endif +# for macOS on Apple Silicon (ARM) see https://bugreports.qt.io/browse/QTBUG-85279 +$(package)_config_opts_arm_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 + $(package)_config_opts_linux = -qt-xkbcommon-x11 $(package)_config_opts_linux += -qt-xcb $(package)_config_opts_linux += -no-xcb-xlib From 5ff3dd1b34d52d3a971c62beec2cb3c5ff666a48 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 15 Dec 2020 17:51:35 +0100 Subject: [PATCH 04/20] Merge #20616: Check CJDNS address is valid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit f7264fff0a098f8b6354c7373b8790791c25dd07 Check if Cjdns address is valid (Lucas Ontivero) Pull request description: CJDNS addresses start with 0xFC and for that reason if a netaddr was unserialized with network type cjdns but its address prefix is not 0xFC then that netaddr should be considered invalid. ACKs for top commit: jonatack: ACK f7264fff0a098f8b6354c7373b8790791c25dd07 practicalswift: cr ACK f7264fff0a098f8b6354c7373b8790791c25dd07: patch looks correct theStack: ACK f7264fff0a098f8b6354c7373b8790791c25dd07 ✔️ Tree-SHA512: 5300df2ffbbd69c40271b6d8df96cca98eb3e1ee76aba62c9c76025d083788ab1f1332775890c63b06e02ca593863a867cd53956bce5962383e8450487898669 --- src/netaddress.cpp | 5 +++++ src/test/net_tests.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 4d43550ba8..4bdd584e9e 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -436,6 +436,11 @@ bool CNetAddr::IsValid() const return false; } + // CJDNS addresses always start with 0xfc + if (IsCJDNS() && (m_addr[0] != 0xFC)) { + return false; + } + // documentation IPv6 address if (IsRFC3849()) return false; diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index 957f2883c8..7e9b47955c 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -549,6 +549,16 @@ BOOST_AUTO_TEST_CASE(cnetaddr_unserialize_v2) BOOST_CHECK_EQUAL(addr.ToString(), "fc00:1:2:3:4:5:6:7"); BOOST_REQUIRE(s.empty()); + // Invalid CJDNS, wrong prefix. + s << MakeSpan(ParseHex("06" // network type (CJDNS) + "10" // address length + "aa000001000200030004000500060007" // address + )); + s >> addr; + BOOST_CHECK(addr.IsCJDNS()); + BOOST_CHECK(!addr.IsValid()); + BOOST_REQUIRE(s.empty()); + // Invalid CJDNS, with bogus length. s << MakeSpan(ParseHex("06" // network type (CJDNS) "01" // address length From 0fba9a3ecdee5d3fa2f406268060b7dbee7ccc51 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 16 Dec 2020 13:58:59 +0100 Subject: [PATCH 05/20] Merge #20650: depends: Drop workaround for a fixed bug in Qt build system 267f259c0dfbd348340d49e9a89b8684b994e22a depends: Drop workaround for a fixed bug in Qt build system (Hennadii Stepanov) Pull request description: This PR drops workaround that was [introduced](https://github.com/bitcoin/bitcoin/pull/4592/commits/1dec09b341f61836147d87656aea7f7be02aab6d) for Qt 5.2.1 for a bug in Qt build system that has been fixed in Qt 5.3.0. The bug reports: - https://bugreports.qt.io/browse/QTBUG-35444 - https://bugreports.qt.io/browse/QTBUG-32519 I've noted this change is a part of the #19716, but I think that a separate commit with the documented reason will benefit it. ACKs for top commit: laanwj: Code review ACK 267f259c0dfbd348340d49e9a89b8684b994e22a jonasschnelli: code Review ACK 267f259c0dfbd348340d49e9a89b8684b994e22a practicalswift: cr ACK 267f259c0dfbd348340d49e9a89b8684b994e22a: patch looks correct Tree-SHA512: b994f94776b4f8bb2f996095c87c7fef55e74d1e64852a890d664275e3739ec890ee388b10baa15445dd24ec7b971ce57d396cb062dbed933c18b6b69525349f --- depends/packages/qt.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 44e9e6fd15..2e657b5345 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -179,10 +179,7 @@ define $(package)_stage_cmds $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. && \ $(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \ $(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \ - $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets && \ - if `test -f qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a`; then \ - cp qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a $($(package)_staging_prefix_dir)/lib; \ - fi + $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets endef define $(package)_postprocess_cmds From 62fab441267d6746581b9685457efbfcaaa8afec Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 25 Dec 2020 10:54:23 +0800 Subject: [PATCH 06/20] Merge #20673: depends: Use more legible qmake commands in qt package 87fe104537eab5ccd8728321fe1c9ba39f7dda78 depends: Use more legible qmake commands in qt package (Hennadii Stepanov) bf35a8da6ec2791dedf36f459add69ac67b11ff9 depends: Do not set build_subdir for qt package (Hennadii Stepanov) Pull request description: Rather than using `cd` to jump all over the place, perform all `(q)make` commands from the top level directory. Looking at bash like `cd ../../../..` gives me a headache. Credits to **fanquake**. This PR is an alternative to #20504 that works without any additional [non-trivial hack](https://github.com/bitcoin/bitcoin/pull/20504#issuecomment-734730336). ACKs for top commit: promag: Tested ACK 87fe104537eab5ccd8728321fe1c9ba39f7dda78. fanquake: ACK 87fe104537eab5ccd8728321fe1c9ba39f7dda78 Tree-SHA512: 1d2a13b5358fc7406c5363ddd62fd363dbc0ec5ace68946e4d3e6e8620419afaa64ef2837488aaed226174e01e8897495085540f7126b80f8b2372d21b5b29f9 --- depends/packages/qt.mk | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 2e657b5345..2bb00faaa2 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -6,7 +6,6 @@ $(package)_file_name=qtbase-$($(package)_suffix) $(package)_sha256_hash=eed620cb268b199bd83b3fc6a471c51d51e1dc2dbb5374fc97a0cc75facbe36f $(package)_dependencies=openssl zlib $(package)_linux_dependencies=freetype fontconfig libxcb -$(package)_build_subdir=qtbase $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch xkb-default.patch no-xlib.patch @@ -158,25 +157,27 @@ define $(package)_config_cmds export PKG_CONFIG_SYSROOT_DIR=/ && \ export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \ + cd qtbase && \ ./configure $($(package)_config_opts) && \ echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \ echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \ - $(MAKE) sub-src-clean && \ - cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \ - cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. && \ - cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile && \ - cd ../lupdate/ && ../../../../qtbase/bin/qmake lupdate.pro -o Makefile && cd ../../../.. + cd .. && \ + $(MAKE) -C qtbase sub-src-clean && \ + qtbase/bin/qmake -o qttranslations/Makefile qttranslations/qttranslations.pro && \ + qtbase/bin/qmake -o qttranslations/translations/Makefile qttranslations/translations/translations.pro && \ + qtbase/bin/qmake -o qttools/src/linguist/lrelease/Makefile qttools/src/linguist/lrelease/lrelease.pro && \ + qtbase/bin/qmake -o qttools/src/linguist/lupdate/Makefile qttools/src/linguist/lupdate/lupdate.pro endef define $(package)_build_cmds - $(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \ - $(MAKE) -C ../qttools/src/linguist/lrelease && \ - $(MAKE) -C ../qttools/src/linguist/lupdate && \ - $(MAKE) -C ../qttranslations + $(MAKE) -C qtbase/src $(addprefix sub-,$($(package)_qt_libs)) && \ + $(MAKE) -C qttools/src/linguist/lrelease && \ + $(MAKE) -C qttools/src/linguist/lupdate && \ + $(MAKE) -C qttranslations endef define $(package)_stage_cmds - $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. && \ + $(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \ $(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \ $(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \ $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets From f827bf9d9326374076d695eeb78955f00ead8027 Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 27 Dec 2020 17:42:48 +0800 Subject: [PATCH 07/20] Merge #20763: test: Fix comment typo in BitcoinTestFramework 40fdb2a212d0a0e775114e4766d065e6d234c155 test: Fix Comment Typo in BitcoinTestFramework (Joel Klabo) Pull request description: Missing "override" in comment describing use of set_test_params ACKs for top commit: michaelfolkson: ACK 40fdb2a212d0a0e775114e4766d065e6d234c155 Tree-SHA512: bf893a0d5f8dc86a3ec2eaf48cd7c0f0f832f3b3d254b3d99953336db7e294571b1d2c8686030bf8a27cbe67b1a85a54e53ebefb2e57d6d8d6ac864a15dce4e7 --- test/functional/test_framework/test_framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 07a87afcf5..bbad8b468e 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -250,7 +250,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): # Methods to override in subclass test scripts. def set_test_params(self): - """Tests must this method to change default values for number of nodes, topology, etc""" + """Tests must override this method to change default values for number of nodes, topology, etc""" raise NotImplementedError def add_options(self, parser): From 87ea218fe2d6dc176a4f4bbd54b891d32ee1df51 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 7 Jan 2021 14:59:08 +0100 Subject: [PATCH 08/20] Merge bitcoin-core/gui#173: Follow Qt docs when implementing rowCount and columnCount 195fcb53a09e9b852544778a077727f81d31303e qt: Follow Qt docs when implementing rowCount and columnCount (Hennadii Stepanov) Pull request description: [`QAbstractItemModel::rowCount`](https://doc.qt.io/qt-5/qabstractitemmodel.html#rowCount): > **Note:** When implementing a table based model, `rowCount()` should return 0 when the parent is valid. [`QAbstractItemModel::columnCount`](https://doc.qt.io/qt-5/qabstractitemmodel.html#columnCount): > **Note:** When implementing a table based model, `columnCount()` should return 0 when the parent is valid. ACKs for top commit: jarolrod: Tested ACK 195fcb53a09e9b852544778a077727f81d31303e. Compiled and ran on macOS (Big Sur 11.1 and Catalina 10.15.7), Arch Linux, and FreeBSD. visually verified no weird effects with the `Address`, `Ban`, `Peer`, and `Transaction` tables. As already stated, the code change brings us inline with what the QT Docs recommend. Tree-SHA512: 179a3430e68e77b22cdf642964cd96c023a2286ee256bbeb25b43df3d2eef6f59978c8d92173c6be5071d127fdcd6aa338142f6eaf003ff08e4abd65172d20ca --- src/qt/addresstablemodel.cpp | 8 ++++++-- src/qt/bantablemodel.cpp | 8 ++++++-- src/qt/peertablemodel.cpp | 8 ++++++-- src/qt/recentrequeststablemodel.cpp | 10 ++++++---- src/qt/transactiontablemodel.cpp | 8 ++++++-- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index 68f4635558..d44ba888e0 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -175,13 +175,17 @@ AddressTableModel::~AddressTableModel() int AddressTableModel::rowCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return priv->size(); } int AddressTableModel::columnCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return columns.length(); } diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index b819653c93..c1f536c42c 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -103,13 +103,17 @@ BanTableModel::~BanTableModel() int BanTableModel::rowCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return priv->size(); } int BanTableModel::columnCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return columns.length(); } diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index 1ccf260a37..72978668d0 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -140,13 +140,17 @@ void PeerTableModel::stopAutoRefresh() int PeerTableModel::rowCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return priv->size(); } int PeerTableModel::columnCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return columns.length(); } diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp index 510f8b7238..b4ca3083d3 100644 --- a/src/qt/recentrequeststablemodel.cpp +++ b/src/qt/recentrequeststablemodel.cpp @@ -38,15 +38,17 @@ RecentRequestsTableModel::~RecentRequestsTableModel() int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const { - Q_UNUSED(parent); - + if (parent.isValid()) { + return 0; + } return list.length(); } int RecentRequestsTableModel::columnCount(const QModelIndex &parent) const { - Q_UNUSED(parent); - + if (parent.isValid()) { + return 0; + } return columns.length(); } diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 2a996b2577..64b9688581 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -294,13 +294,17 @@ int TransactionTableModel::getChainLockHeight() const int TransactionTableModel::rowCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return priv->size(); } int TransactionTableModel::columnCount(const QModelIndex &parent) const { - Q_UNUSED(parent); + if (parent.isValid()) { + return 0; + } return columns.length(); } From 403d2a09173ffe1cd5af43aeca3231283eb89486 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 26 Jan 2021 09:47:38 +0100 Subject: [PATCH 09/20] Merge bitcoin-core/gui#167: raise helpMessageDialog 77114462f2328914b7a918f40776e522a0898e56 raise helpMessageDialog (randymcmillan) Pull request description: the raise() method brings the helpMessageDialog to the top if it is obscured by another window. ACKs for top commit: promag: Code review ACK 77114462f2328914b7a918f40776e522a0898e56. hebasto: ACK 77114462f2328914b7a918f40776e522a0898e56, tested on: Tree-SHA512: 0d5b107aa9a5ce3891e88ef69f64461c8b23d17476b798691119e84bfc78e16b2491c798adb5d6cc347af3b7f18729593d7924090c336114a3cf34fbee344bfb --- src/qt/bitcoingui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c8fff28ac6..1b1066253e 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -957,7 +957,7 @@ void BitcoinGUI::showBackups() void BitcoinGUI::showHelpMessageClicked() { - helpMessageDialog->show(); + GUIUtil::bringToFront(helpMessageDialog); } void BitcoinGUI::showCoinJoinHelpClicked() From f9ae80e2cf31a0f76bba9e1be10bcfb135b8b014 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 4 Feb 2021 09:38:45 +0800 Subject: [PATCH 10/20] Merge #21065: build: make macOS HOST in download-osx generic f22a3ec1403293f45a06558d105f0da624c5ebed build: make macOS HOST in download-osx generic (fanquake) Pull request description: This was missed in #20419, and the update before that, so just make this non-versioned so that we don't have to worry about it. This is fine, because it's just for downloading sources. ACKs for top commit: RandyMcMillan: ACK f22a3ec1403293f45a06558d105f0da624c5ebed dongcarl: utACK f22a3ec1403293f45a06558d105f0da624c5ebed Tree-SHA512: 3a6993a69594a793a5185e4ba48858443a1002a37b96ff881d39ca7719c79432b35d709bd9a9379f8046bdbeb716c5e1598f273a7e7e3f3bf528b6a807abe5ec --- depends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/Makefile b/depends/Makefile index 3e6dc92b3d..b8bb639ee4 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -180,7 +180,7 @@ install: check-packages $(host_prefix)/share/config.site download-one: check-sources $(all_sources) download-osx: - @$(MAKE) -s HOST=x86_64-apple-darwin14 download-one + @$(MAKE) -s HOST=x86_64-apple-darwin download-one download-linux: @$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one download-win: From 12cb3602475cf3e9ce8f12cbda4c9ebf0903b14e Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 8 Feb 2021 10:38:49 +0100 Subject: [PATCH 11/20] Merge #21084: test: fix timeout decrease in feature_assumevalid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0d39b5848a7a341cd2b958336861cdd4098e2616 test: fix timeout decrease in feature_assumevalid (Bruno Garcia) Pull request description: This PR fixes the timeout decrease in assert_blockchain_height function. ACKs for top commit: practicalswift: cr ACK 0d39b5848a7a341cd2b958336861cdd4098e2616: patch looks correct theStack: ACK 0d39b5848a7a341cd2b958336861cdd4098e2616 ⏲️ Tree-SHA512: ae3c83420b4de4ad41f1b20b6e77c3a26a8c5ac4fb136b2645fde119545a413c61312f76a16473141774bc955d30ac4fc86e5ca6cf729f8978a17d0dab520feb --- test/functional/feature_assumevalid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py index 812315d15b..0936b71ab8 100755 --- a/test/functional/feature_assumevalid.py +++ b/test/functional/feature_assumevalid.py @@ -88,7 +88,7 @@ class AssumeValidTest(BitcoinTestFramework): last_height = current_height if timeout < 0: assert False, "blockchain too short after timeout: %d" % current_height - timeout - 0.25 + timeout -= 0.25 continue elif current_height > height: assert False, "blockchain too long: %d" % current_height From cd3bedaf1c45cb372877644ca2c67ef59fbe4058 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 9 Feb 2021 11:59:19 +0100 Subject: [PATCH 12/20] Merge #20557: addrman: Fix new table bucketing during unserialization 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b [addrman] Don't repeat "Bucketing method was updated" log multiple times (John Newbery) 436292367c1d737cf73bd985293539500d1206f5 [addrman] Improve serialization comments (John Newbery) ac3547eddd8a7d67b4103508f30d5d02a9c1f148 [addrman] Improve variable naming/code style of touched code. (John Newbery) a5c9b04959f443372400f9a736c6eaf5502284a1 [addrman] Don't rebucket new table entries unnecessarily (John Newbery) 8062d928ce5c495c1b6ecd18e4b30c12da822d90 [addrman] Rename asmap version to asmap checksum (John Newbery) 009b8e0fdf3bfb11668edacced5d8b70726d5d0e [addrman] Improve variable naming/code style of touched code. (John Newbery) b4c5fda417dd9ff8bf9fe24a87d384a649e3730d [addrman] Fix new table bucketing during unserialization (John Newbery) Pull request description: This fixes three issues in addrman unserialization. 1. An addrman entry can appear in up to 8 new table buckets. We store this entry->bucket indexing during shutdown so that on restart we can restore the entries to their correct buckets. Commit ec45646de9e62b3d42c85716bfeb06d8f2b507dc broke the deserialization code so that each entry could only be put in up to one new bucket. 2. Unserialization may result in an entry appearing in a 9th bucket. If the entry already appears in 8 buckets don't try to place it in another bucket. 3. We unnecessarily rebucket when reading a peers.dat with file version 1. Don't do that. ACKs for top commit: vasild: ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b glozow: re-ACK https://github.com/bitcoin/bitcoin/commit/4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b, changes were a rename, comments, and removing repeat-logging. naumenkogs: ACK 4676a4f laanwj: Code review ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b dhruv: ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b ryanofsky: Code review ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b. I'm not previously familiar with this code but all the changes here do make sense and seem like improvements. Left some notes and comments, but they aren't important so feel to ignore. Tree-SHA512: b228984f6dec5910be23c3740ae20258da33bcf66ceb7edb10e5a53163450f743bab349e47f09808b7e8d40f27143119ec3e0981d7e678aa494d8559a1c99c23 --- src/addrman.h | 92 +++++++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 39 deletions(-) diff --git a/src/addrman.h b/src/addrman.h index 26c03c4c7a..a42ec4769d 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -332,22 +332,20 @@ public: * * nNew * * nTried * * number of "new" buckets XOR 2**30 - * * all nNew addrinfos in vvNew - * * all nTried addrinfos in vvTried - * * for each bucket: + * * all new addresses (total count: nNew) + * * all tried addresses (total count: nTried) + * * for each new bucket: * * number of elements - * * for each element: index + * * for each element: index in the serialized "all new addresses" + * * asmap checksum * * 2**30 is xorred with the number of buckets to make addrman deserializer v0 detect it * as incompatible. This is necessary because it did not check the version number on * deserialization. * - * Notice that vvTried, mapAddr and vVector are never encoded explicitly; + * vvNew, vvTried, mapInfo, mapAddr and vRandom are never encoded explicitly; * they are instead reconstructed from the other information. * - * vvNew is serialized, but only used if ADDRMAN_UNKNOWN_BUCKET_COUNT didn't change, - * otherwise it is reconstructed as well. - * * This format is more complex, but significantly smaller (at most 1.5 MiB), and supports * changes to the ADDRMAN_ parameters without breaking the on-disk structure. * @@ -405,13 +403,13 @@ public: } } } - // Store asmap version after bucket entries so that it + // Store asmap checksum after bucket entries so that it // can be ignored by older clients for backward compatibility. - uint256 asmap_version; + uint256 asmap_checksum; if (m_asmap.size() != 0) { - asmap_version = SerializeHash(m_asmap); + asmap_checksum = SerializeHash(m_asmap); } - s << asmap_version; + s << asmap_checksum; } template @@ -494,47 +492,63 @@ public: nTried -= nLost; // Store positions in the new table buckets to apply later (if possible). - std::map entryToBucket; // Represents which entry belonged to which bucket when serializing + // An entry may appear in up to ADDRMAN_NEW_BUCKETS_PER_ADDRESS buckets, + // so we store all bucket-entry_index pairs to iterate through later. + std::vector> bucket_entries; - for (int bucket = 0; bucket < nUBuckets; bucket++) { - int nSize = 0; - s >> nSize; - for (int n = 0; n < nSize; n++) { - int nIndex = 0; - s >> nIndex; - if (nIndex >= 0 && nIndex < nNew) { - entryToBucket[nIndex] = bucket; + for (int bucket = 0; bucket < nUBuckets; ++bucket) { + int num_entries{0}; + s >> num_entries; + for (int n = 0; n < num_entries; ++n) { + int entry_index{0}; + s >> entry_index; + if (entry_index >= 0 && entry_index < nNew) { + bucket_entries.emplace_back(bucket, entry_index); } } } - uint256 supplied_asmap_version; + // If the bucket count and asmap checksum haven't changed, then attempt + // to restore the entries to the buckets/positions they were in before + // serialization. + uint256 supplied_asmap_checksum; if (m_asmap.size() != 0) { - supplied_asmap_version = SerializeHash(m_asmap); + supplied_asmap_checksum = SerializeHash(m_asmap); } - uint256 serialized_asmap_version; + uint256 serialized_asmap_checksum; if (format >= Format::V2_ASMAP) { - s >> serialized_asmap_version; + s >> serialized_asmap_checksum; + } + const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && + serialized_asmap_checksum == supplied_asmap_checksum}; + + if (!restore_bucketing) { + LogPrint(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n"); } - for (int n = 0; n < nNew; n++) { - CAddrInfo &info = mapInfo[n]; - int bucket = entryToBucket[n]; - int nUBucketPos = info.GetBucketPosition(nKey, true, bucket); - if (format >= Format::V2_ASMAP && nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && vvNew[bucket][nUBucketPos] == -1 && - info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS && serialized_asmap_version == supplied_asmap_version) { + for (auto bucket_entry : bucket_entries) { + int bucket{bucket_entry.first}; + const int entry_index{bucket_entry.second}; + CAddrInfo& info = mapInfo[entry_index]; + + // The entry shouldn't appear in more than + // ADDRMAN_NEW_BUCKETS_PER_ADDRESS. If it has already, just skip + // this bucket_entry. + if (info.nRefCount >= ADDRMAN_NEW_BUCKETS_PER_ADDRESS) continue; + + int bucket_position = info.GetBucketPosition(nKey, true, bucket); + if (restore_bucketing && vvNew[bucket][bucket_position] == -1) { // Bucketing has not changed, using existing bucket positions for the new table - vvNew[bucket][nUBucketPos] = n; - info.nRefCount++; + vvNew[bucket][bucket_position] = entry_index; + ++info.nRefCount; } else { - // In case the new table data cannot be used (format unknown, bucket count wrong or new asmap), + // In case the new table data cannot be used (bucket count wrong or new asmap), // try to give them a reference based on their primary source address. - LogPrint(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n"); bucket = info.GetNewBucket(nKey, m_asmap); - nUBucketPos = info.GetBucketPosition(nKey, true, bucket); - if (vvNew[bucket][nUBucketPos] == -1) { - vvNew[bucket][nUBucketPos] = n; - info.nRefCount++; + bucket_position = info.GetBucketPosition(nKey, true, bucket); + if (vvNew[bucket][bucket_position] == -1) { + vvNew[bucket][bucket_position] = entry_index; + ++info.nRefCount; } } } From a9c314feba1a4b6ac0007de9250415216b895b60 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 10 Feb 2021 14:30:46 +0100 Subject: [PATCH 13/20] Merge #21123: code style: Add EditorConfig file 7a135d57b2ac17477b25d5046a3bec57eac3ab30 Add EditorConfig file. (Kiminuo) Pull request description: ### Motivation Developers are supposed to follow [Coding style](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-general). However, [from time to time](https://github.com/bitcoin/bitcoin/pull/21075#discussion_r570125634) a PR is created and then its author is asked to change tabs to spaces, for example. Introducing an `.editorconfig` file can mitigate these formatting issues. ### User story A contributor wants to create a new PR. She clones Bitcoin Core repo, opens her editor, the editor loads `.editorconfig` rules and writes her patch with correct formatting rules. Less Coding Style issues is then discovered in the PR review process and thus less CI runs are needed. ### What is EditorConfig file? https://editorconfig.org provides very well and concise explanation: > What is EditorConfig? > EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems. ### Support `.editorconfig` is supported by many IDEs and text editors. Sometimes, the support is out of the box and sometimes a plugin is needed. However, for example, VS Code detects `.editorconfig` presence and automatically offers you to install the missing plugin. See https://editorconfig.org/#pre-installed for details on support. To name a few: * Visual Studio (out of the box) * VS Code (plugin) * JetBrains IDEs (IntelliJ IDEA, PyCharm, etc.) (out of the box) * Sublime Text (plugin) * Emacs (plugin) * Vim (plugin) Not supported (AFAIK): * [mcedit](https://github.com/MidnightCommander/mc) ### My editor does not support `.editorconfig` Then nothing really changes for you. ### `.editorconfig` vs `.clang-format` As explained [here](https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/): > Note that Visual Studio also supports EditorConfig, which works in a similar way. ClangFormat, however, has a [much larger variety of style options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) than EditorConfig, including some very C++ specific rules that can be set, and it is already used by C++ developers today. Having both `.editorconfig` and `.clang-format` in a project, may not always work correctly though, I think. As some editors may have a plugin for `.editorconfig` and a plugin for `clang-formatter` which may not work correctly in unison. In VS Code & Visual Studio EditorConfig [takes precedence over other settings](https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/ide/cpp-editorconfig-properties.md#c-editorconfig-formatting-conventions). ### Possible issues Your editor may change formatting for some 3rd party library if you edit the code. A solution for this would be to make EditorConfig rules more specific (include only certain paths). I'm not sure if it is an issue in practice. ### Testing Add some trailing whitespace to a Python file and save the file. You should see that the trailing whitespace is removed. ### Possible future work It would be great to define rules for Makefiles. This would be good start: ``` # Makefiles [Makefile,*.am] indent_style = tab trim_trailing_whitespace = true ``` I don't know makefiles in this project good enough to propose something reasonable. If this PR is well received, it would be great to add it in this PR. Also, there are actually many different file extensions and so the proposed `.editorconfig` file can be probably improved very much: ```powershell Get-ChildItem -Recurse | % {$_.Extension.ToLower()} | sort | unique ```
Click to see the output ``` .1 .ac .adoc .am .bash-completion .bat .bmp .c .cc .cert .cfg .clang_complete .clang-format .cmake .cmd .cnf .com .conf .cpp .css .csv .doxyfile .dtd .empty .exe .exp .gci .gitattributes .github .gitignore .gitmodules .guess .h .hex .hpp .html .icns .ico .idb .ilk .in .include .ini .init .ipp .jam .js .json .lastbuildstate .lib .list .log .m .m4 .md .mk .mm .moc .obj .openrc .openrcconf .patch .pc .pdb .pl .plist .png .po .pro .py .python-version .qbk .qm .qml .qrc .raw .rb .rc .recipe .res .s .sage .sass .scm .scss .service .sgml .sh .sln .spec .sub .supp .svg .targets .td .tlog .ts .tx .txt .ui .user .v2 .vcxproj .verbatim .vscode .xml .xpm .xsl .y .yapf .yml .yy ```
Fixes #21092 ACKs for top commit: laanwj: Tested re-ACK 7a135d57b2ac17477b25d5046a3bec57eac3ab30 MarcoFalke: Approach ACK 7a135d57b2ac17477b25d5046a3bec57eac3ab30 Tree-SHA512: c36a3424ecc751fbdd66101463b0c470f5c7adcdb4795b1cd267ff718eb345a04615fc1182338adf5b7db724469dca00c64815a9ef77064734a6536fba41a2ba --- .editorconfig | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..4967e675f6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,26 @@ +# This is the top-most EditorConfig file. +root = true + +# For all files. +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +# Source code files +[*.{h,cpp,py,sh}] +indent_size = 4 + +# .cirrus.yml, .appveyor.yml, .fuzzbuzz.yml, etc. +[*.yml] +indent_size = 2 + +# Makefiles +[{*.am,Makefile.*.include}] +indent_style = tab + +# Autoconf scripts +[configure.ac] +indent_size = 2 From e07e289e0a976e12ff7270b19edd88c7a71d2d8f Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 13 Mar 2021 18:52:32 +0100 Subject: [PATCH 14/20] Merge #21111: Improve OpenRC initscript 95f97111dd27f32dfcb461c9dd6890aa8d1355ed contrib/init: (OpenRC) quote some unquoted variables. (parazyd) 737feadff7c026412039774de0d10931fe0c5bcc contrib/init: (OpenRC) Do not fail if both rpcuser and rpcpassword are unset. (parazyd) Pull request description: This pull request improves the available OpenRC initscripts in `contrib/init`. The first commit (737feadff7c026412039774de0d10931fe0c5bcc) reworks `checkconfig()` to not fail if **both** `rpcuser` and `rpcpassword` are unset, because this implies that bitcoind shall use the `.cookie` file for RPC authentication. Currently, the initscript does not allow starting bitcoind without a set `rpcuser` and `rpcpassword`. The second commit (95f97111dd27f32dfcb461c9dd6890aa8d1355ed) simply quotes some unquoted variables. ACKs for top commit: kristapsk: ACK 95f97111dd27f32dfcb461c9dd6890aa8d1355ed Tree-SHA512: 62bebcd07143c147e349c0cfc17b54ef21bd4684377b444f58c6bd1f509a4d3e1af58746fa7215f18e33021f691bbbc5e42f4df497458322b055e545b7f30d46 --- contrib/init/dashd.openrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/init/dashd.openrc b/contrib/init/dashd.openrc index 85baaeec70..a5ce8b4426 100644 --- a/contrib/init/dashd.openrc +++ b/contrib/init/dashd.openrc @@ -60,16 +60,17 @@ start_pre() { "${BITCOIND_PIDDIR}" checkpath -f \ - -o ${BITCOIND_USER}:${BITCOIND_GROUP} \ + -o "${BITCOIND_USER}:${BITCOIND_GROUP}" \ -m 0660 \ - ${BITCOIND_CONFIGFILE} + "${BITCOIND_CONFIGFILE}" checkconfig || return 1 } checkconfig() { - if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then + if grep -qs '^rpcuser=' "${BITCOIND_CONFIGFILE}" && \ + ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then eerror "" eerror "ERROR: You must set a secure rpcpassword to run dashd." eerror "The setting must appear in ${BITCOIND_CONFIGFILE}" From 9c8db95941d2175d8489ebb12c3a297abb524372 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 24 Mar 2021 16:52:04 +0800 Subject: [PATCH 15/20] Merge #20734: build: Make platform-specific targets available for proper platform builds only 3d31abbaaad599443ec5ffee90ddb6989a625277 build: Make Windows-specific targets available for Windows builds only (Hennadii Stepanov) 92990e25b7e5d02651ffa27f2d57c4c2c190668e build: Make macOS-specific targets available for macOS builds only (Hennadii Stepanov) Pull request description: On master (f1dbf92ff0475a01d20170ea422c1d086acbbc57) it is possible to point `make` to macOS and Windows specific targets even the build system is configured to build for Linux platforms: ``` $ make Bitcoin-Core.dmg ... $ make bitcoin-21.99.0-win64-setup ... ``` Such behavior makes no sense, and it is confused. Fixed in this PR. ACKs for top commit: fanquake: ACK 3d31abbaaad599443ec5ffee90ddb6989a625277 - tested that nonsensical targets are no longer available. i.e Tree-SHA512: bbd8450bf98fbccb0b828df2f753ed0dbbd203defa2f58ce21390ee2ea183c95d8ff585d62d52be870dbf0158e2bb0fbd47eda026b80174ee6fd617473f5ac03 --- Makefile.am | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index cd33808f28..45393c3145 100644 --- a/Makefile.am +++ b/Makefile.am @@ -74,6 +74,7 @@ COVERAGE_INFO = baseline.info \ dist-hook: -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - +if TARGET_WINDOWS $(BITCOIN_WIN_INSTALLER): all-recursive $(MKDIR_P) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release @@ -84,6 +85,10 @@ $(BITCOIN_WIN_INSTALLER): all-recursive echo error: could not build $@ @echo built $@ +deploy: $(BITCOIN_WIN_INSTALLER) +endif + +if TARGET_DARWIN $(OSX_APP)/Contents/PkgInfo: $(MKDIR_P) $(@D) @echo "APPL????" > $@ @@ -127,7 +132,7 @@ $(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x. tiffutil -cathidpicheck $^ -out $@ deploydir: $(OSX_DMG) -else +else !BUILD_DARWIN APP_DIST_DIR=$(top_builddir)/dist APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications @@ -154,15 +159,11 @@ $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt: $(OSX_APP_BUILT) $(OSX_PACKAG INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2 deploydir: $(APP_DIST_EXTRAS) -endif +endif !BUILD_DARWIN -if TARGET_DARWIN appbundle: $(OSX_APP_BUILT) deploy: $(OSX_DMG) endif -if TARGET_WINDOWS -deploy: $(BITCOIN_WIN_INSTALLER) -endif $(BITCOIN_QT_BIN): FORCE $(MAKE) -C src qt/$(@F) From a5c84be618661cdbadd973190c415682ec7d50fb Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 28 Mar 2021 19:21:22 +0200 Subject: [PATCH 16/20] Merge bitcoin-core/gui#254: refactor: Drop redundant setEditTriggers(NoEditTriggers) calls 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129 qt, refactor: Drop redundant setEditTriggers(NoEditTriggers) calls (Hennadii Stepanov) Pull request description: The models of the both views have no `Qt::ItemIsEditable` flag: https://github.com/bitcoin-core/gui/blob/3c87dbe95c925274f80234ad4a88beb5a05fdfff/src/qt/peertablemodel.cpp#L218-L224 https://github.com/bitcoin-core/gui/blob/3c87dbe95c925274f80234ad4a88beb5a05fdfff/src/qt/bantablemodel.cpp#L148-L154 ACKs for top commit: Talkless: utACK 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129, seems reasonable. jarolrod: ACK 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129, looks correct. Tree-SHA512: 4356e4d785055935fba452488a5d97ed95995def97b26ab18af43a545835f9e9d4c347e4cad7952aa725179cf6e775a2208c48730feebf40e3b1a7ba5f402af0 --- src/qt/rpcconsole.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 49538b07a2..1f1a85663f 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -619,7 +619,6 @@ void RPCConsole::setClientModel(ClientModel *model) // set up peer table ui->peerWidget->setModel(model->getPeerTableModel()); ui->peerWidget->verticalHeader()->hide(); - ui->peerWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows); ui->peerWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); ui->peerWidget->setContextMenuPolicy(Qt::CustomContextMenu); @@ -672,7 +671,6 @@ void RPCConsole::setClientModel(ClientModel *model) // set up ban table ui->banlistWidget->setModel(model->getBanTableModel()); ui->banlistWidget->verticalHeader()->hide(); - ui->banlistWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->banlistWidget->setSelectionBehavior(QAbstractItemView::SelectRows); ui->banlistWidget->setSelectionMode(QAbstractItemView::SingleSelection); ui->banlistWidget->setContextMenuPolicy(Qt::CustomContextMenu); From dcadc441aa8a487fcb00571c19f2ea3c96fdd1a9 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 1 Apr 2021 19:16:39 +0800 Subject: [PATCH 17/20] Merge #21300: script: Add explanatory comment to tc.sh 3a0446fad470595db09929695ff02debe12bd4cd script: Add explanatory comment to tc.sh (dscotese) Pull request description: This is a replacement for #21289 tc.sh is used to limit bandwidth. I ran it and it is limiting my bandwidth. When I ran it, I got one error. I have not found an explanation anywhere of what the error means, but my best guess is consistent with the result, so I propose the explanatory comment to save others time when they use it and also get the error. ACKs for top commit: laanwj: that said, LGTM ACK 3a0446fad470595db09929695ff02debe12bd4cd Tree-SHA512: 5403a2a0fec3724625c20402a96334c3c7a620324a930c5fd828017da8911d2867aecb7a2ad94a23d1f189009d3eb197a67eb59c8e4531fd215d9b1edb600440 --- contrib/qos/tc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh index 145a5fd06f..6e72793deb 100644 --- a/contrib/qos/tc.sh +++ b/contrib/qos/tc.sh @@ -14,7 +14,7 @@ LOCALNET_V4="192.168.0.0/16" #defines the IPv6 address space for which you wish to disable rate limiting LOCALNET_V6="fe80::/10" -#delete existing rules +#delete existing rules ('Error: Cannot delete qdisc with handle of zero.' means there weren't any.) tc qdisc del dev ${IF} root #add root class From 499fb6c18b078cbee1feb4b0d4b551caddb402ea Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 13 Apr 2021 21:16:59 +0800 Subject: [PATCH 18/20] Merge #21633: refactor: add [[noreturn]] attribute where applicable 003929c0d55532038d5bf6fc0ff4a20628710fae refactor: add [[noreturn]] attribute where applicable (fanquake) Pull request description: Similar to #10843. We could build with `-Wmissing-noreturn`, however that would also mean modifying something like `--suppress-external-warnings` to suppress warnings for leveldb, which I don't think we want to do. In any case, the functions where this is applicable are only added/removed very rarely. ACKs for top commit: vasild: ACK 003929c0d55532038d5bf6fc0ff4a20628710fae Tree-SHA512: 33dfa6547d6b84f38a941f24d4c2effe8fde7b93dbc0b27a9309716420e4a879fdbe689d789fa5439d65f5f78292f89fd9dc1b61c97acf69316dfed954086705 --- src/test/util_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 2b564d8512..baa50cbdec 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -1052,7 +1052,7 @@ static constexpr char LockCommand = 'L'; static constexpr char UnlockCommand = 'U'; static constexpr char ExitCommand = 'X'; -static void TestOtherProcess(fs::path dirname, std::string lockname, int fd) +[[noreturn]] static void TestOtherProcess(fs::path dirname, std::string lockname, int fd) { char ch; while (true) { From 44060e39a01d2d1287312fd6f09b187dffbed4fe Mon Sep 17 00:00:00 2001 From: "W. J. van der Laan" Date: Mon, 19 Apr 2021 08:53:41 +0200 Subject: [PATCH 19/20] Merge #21615: script: Add trusted key for hebasto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 55d85834ccd73aa2f93cf9a81523cb747973346e script: Add trusted key for hebasto (Hennadii Stepanov) Pull request description: It is assumed that my responsibility will be limited to the [GUI repo](https://github.com/bitcoin-core/gui). ACKs for top commit: laanwj: ACK 55d85834ccd73aa2f93cf9a81523cb747973346e MarcoFalke: matches the key I have locally ACK 55d85834ccd73aa2f93cf9a81523cb747973346e 🍪 jarolrod: ACK 55d85834ccd73aa2f93cf9a81523cb747973346e 🥃 Tree-SHA512: 256d03e108c9a14e251340ac6e91234d076778cb6bd551439182176207051f4efc55d396754867e5a7191c8c698610f92016668e163037c67dde56f4136026b8 --- contrib/verify-commits/trusted-keys | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/verify-commits/trusted-keys b/contrib/verify-commits/trusted-keys index 27fede6277..c14f90b04b 100644 --- a/contrib/verify-commits/trusted-keys +++ b/contrib/verify-commits/trusted-keys @@ -4,3 +4,4 @@ B8B3F1C0E58C15DB6A81D30C3648A882F4316B9B CA03882CB1FC067B5D3ACFE4D300116E1C875A3D E777299FC265DD04793070EB944D35F9AC3DB76A +D1DBF2C4B96F2DEBF4C16654410108112E7EA81F From 9dc2ed4208da08c6aee98f0e1328234bc850227f Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 21 Apr 2021 13:26:12 +0800 Subject: [PATCH 20/20] Merge #20353: configure: Support -fdebug-prefix-map and -fmacro-prefix-map 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5 configure: Support -f{debug,macro}-prefix-map (Anthony Towns) Pull request description: When bitcoin is checked out in two directories (eg via git worktree) object files between the two will differ due to the full path being included in the debug section. `-fdebug-prefix-map` is used to replace this with "." to avoid this unnecessary difference and allow ccache to share objects between worktrees (provided the source and compile options are the same). Also provide `-fmacro-prefix-map` if supported so that the working dir is not encoded in `__FILE__` macros. ACKs for top commit: practicalswift: cr ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5: patch looks correct fanquake: ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5 Tree-SHA512: b6a37c1728ec3b2e552f244da0e66db113c1e7662c7ac502e12ff466f3dbfbfefae12695ca135137c50dbb1c4c5d84059116c0cd09b391a17466dc77b8726679 --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index aaf71d8cb4..adcfec57be 100644 --- a/configure.ac +++ b/configure.ac @@ -1424,6 +1424,10 @@ if test "x$use_ccache" != "xno"; then CXX="$ac_cv_path_CCACHE $CXX" fi AC_MSG_RESULT($use_ccache) + if test "x$use_ccache" = "xyes"; then + AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B],[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_srcdir)=."],,[[$CXXFLAG_WERROR]]) + AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B],[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_srcdir)=."],,[[$CXXFLAG_WERROR]]) + fi fi if test "x$use_ccache" = "xyes"; then AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"])