From fab1ef9512c364c2b906ebfacc76439816e216d1 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 24 Oct 2023 19:02:35 +0200 Subject: [PATCH 1/2] Bump .python-version from 3.9.17 to 3.9.18 Requested in https://github.com/bitcoin/bitcoin/pull/28211/files#r1309945635 --- .python-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.python-version b/.python-version index 27390292335..43077b24609 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.9.17 +3.9.18 From fae379b6b1c9d434821acc348f010d67c4fee927 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 3 Aug 2023 14:22:15 +0200 Subject: [PATCH 2/2] build: Bump minimum supported Clang to clang-13 --- ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh | 6 +++--- doc/dependencies.md | 2 +- src/addrdb.cpp | 3 +-- src/net.cpp | 2 +- src/wallet/interfaces.cpp | 8 ++++---- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh index 2d181f1bb8b..20044d7e1cb 100755 --- a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh +++ b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh @@ -8,8 +8,8 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye" -# Use minimum supported python3.9 and clang-10 (or best-effort clang-11), see doc/dependencies.md -export PACKAGES="python3-zmq clang-11 llvm-11 libc++abi-11-dev libc++-11-dev" -export DEP_OPTS="NO_WALLET=1 CC=clang-11 CXX='clang++-11 -stdlib=libc++'" +# Use minimum supported python3.9 and clang-13, see doc/dependencies.md +export PACKAGES="python3-zmq clang-13 llvm-13 libc++abi-13-dev libc++-13-dev" +export DEP_OPTS="NO_WALLET=1 CC=clang-13 CXX='clang++-13 -stdlib=libc++'" export GOAL="install" export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared" diff --git a/doc/dependencies.md b/doc/dependencies.md index 2e9573dccb6..a9a32fe8bd0 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -8,7 +8,7 @@ You can find installation instructions in the `build-*.md` file for your platfor | --- | --- | | [Autoconf](https://www.gnu.org/software/autoconf/) | [2.69](https://github.com/bitcoin/bitcoin/pull/17769) | | [Automake](https://www.gnu.org/software/automake/) | [1.13](https://github.com/bitcoin/bitcoin/pull/18290) | -| [Clang](https://clang.llvm.org) | [10.0](https://github.com/bitcoin/bitcoin/pull/27682) | +| [Clang](https://clang.llvm.org) | [13.0](https://github.com/bitcoin/bitcoin/pull/28210) | | [GCC](https://gcc.gnu.org) | [9.1](https://github.com/bitcoin/bitcoin/pull/27662) | | [Python](https://www.python.org) (scripts, tests) | [3.9](https://github.com/bitcoin/bitcoin/pull/28211) | | [systemtap](https://sourceware.org/systemtap/) ([tracing](tracing.md))| N/A | diff --git a/src/addrdb.cpp b/src/addrdb.cpp index 8b85b77e2bf..8cf932bcb63 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -209,8 +209,7 @@ util::Result> LoadAddrman(const NetGroupManager& netgro return util::Error{strprintf(_("Invalid or corrupt peers.dat (%s). If you believe this is a bug, please report it to %s. As a workaround, you can move the file (%s) out of the way (rename, move, or delete) to have a new one created on the next start."), e.what(), PACKAGE_BUGREPORT, fs::quoted(fs::PathToString(path_addr)))}; } - return {std::move(addrman)}; // std::move should be unnecessary but is temporarily needed to work around clang bug - // (https://github.com/bitcoin/bitcoin/pull/25977#issuecomment-1561270092) + return addrman; } void DumpAnchors(const fs::path& anchors_db_path, const std::vector& anchors) diff --git a/src/net.cpp b/src/net.cpp index 09a3d8617a7..16075efdbb8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1415,7 +1415,7 @@ std::optional V2Transport::GetMessageType(Span& cont } // Strip message type bytes of contents. contents = contents.subspan(CMessageHeader::COMMAND_SIZE); - return {std::move(ret)}; + return ret; } CNetMessage V2Transport::GetReceivedMessage(std::chrono::microseconds time, bool& reject_message) noexcept diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp index 65285187f4c..c9419be0ab5 100644 --- a/src/wallet/interfaces.cpp +++ b/src/wallet/interfaces.cpp @@ -602,7 +602,7 @@ class WalletLoaderImpl : public WalletLoader bilingual_str error; std::unique_ptr wallet{MakeWallet(m_context, CreateWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))}; if (wallet) { - return {std::move(wallet)}; + return wallet; } else { return util::Error{error}; } @@ -616,7 +616,7 @@ class WalletLoaderImpl : public WalletLoader bilingual_str error; std::unique_ptr wallet{MakeWallet(m_context, LoadWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))}; if (wallet) { - return {std::move(wallet)}; + return wallet; } else { return util::Error{error}; } @@ -627,7 +627,7 @@ class WalletLoaderImpl : public WalletLoader bilingual_str error; std::unique_ptr wallet{MakeWallet(m_context, RestoreWallet(m_context, backup_file, wallet_name, /*load_on_start=*/true, status, error, warnings))}; if (wallet) { - return {std::move(wallet)}; + return wallet; } else { return util::Error{error}; } @@ -642,7 +642,7 @@ class WalletLoaderImpl : public WalletLoader .solvables_wallet_name = res->solvables_wallet ? std::make_optional(res->solvables_wallet->GetName()) : std::nullopt, .backup_path = res->backup_path, }; - return {std::move(out)}; // std::move to work around clang bug + return out; } std::string getWalletDir() override {