Skip to content

Commit fc88c57

Browse files
06f3ffe Merge bitcoin#26912: ci: Bump --combinedlogslen to debug intermittent issues (MarcoFalke) 3698306 Merge bitcoin#26810: doc: remove nonexistent files from copyright (MarcoFalke) 220ab50 Merge bitcoin#26824: build: fix configuring with only bitcoin-util (fanquake) 602e549 Merge bitcoin#26867: doc: Mention restoring wallet via GUI (MarcoFalke) 1964560 Merge bitcoin#26758: refactor: Add `performance-no-automatic-move` clang-tidy check (MarcoFalke) f29b64e Merge bitcoin#26752: wallet: Remove `mempool_sequence` from interface methods (glozow) a097e7f Merge bitcoin#26771: doc: Correct linked Microsoft URLs (fanquake) 9ca4030 fix: re-resolve conflicts for previous backports in wallet_multiwallet.py after bitcoin#26192 (Konstantin Akimov) 25acdc3 Merge bitcoin#26192: rpc: Improve error when wallet is already loaded (Andrew Chow) be97c0f Merge bitcoin#26120: refactor: Make bitcoin-util grind_task tsan friendly (MarcoFalke) a4ea84e Merge bitcoin#26378: refactor: Pass reference to last header, not pointer (MarcoFalke) Pull request description: ## What was done? Regular backports from Bitcoin Core v25 ## How Has This Been Tested? Run unit & functional tests ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK 06f3ffe Tree-SHA512: c74ae09275f382c88421a00d44e82562f13d8c4fa564a8c0c30b01d41d8dd457041d195b014ceb5d23a22ef38dd6451f82302838cfcd70e51dfaaab2be09cf45
2 parents 5632d97 + 06f3ffe commit fc88c57

26 files changed

Lines changed: 83 additions & 90 deletions

ci/dash/test_integrationtests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
4444

4545
set +e
4646
# shellcheck disable=SC2086
47-
LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib" ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir="$(pwd)/testdatadirs" $PASS_ARGS $EXTRA_ARGS
47+
LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib" ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir="$(pwd)/testdatadirs" $PASS_ARGS $EXTRA_ARGS
4848
RESULT=$?
4949
set -e
5050

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ if test "$use_natpmp" != "no"; then
15871587
CPPFLAGS="$TEMP_CPPFLAGS"
15881588
fi
15891589

1590-
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nononononononono"; then
1590+
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nonononononononono"; then
15911591
use_boost=no
15921592
else
15931593
use_boost=yes

contrib/debian/copyright

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ Copyright: 2010-2011, Jonas Smedegaard <dr@jones.dk>
1717
2011, Matt Corallo <matt@bluematt.me>
1818
License: GPL-2+
1919

20-
Files: src/secp256k1/build-aux/m4/ax_jni_include_dir.m4
21-
Copyright: 2008 Don Anderson <dda@sleepycat.com>
22-
License: GNU-All-permissive-License
23-
24-
Files: src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4
25-
Copyright: 2008 Paolo Bonzini <bonzini@gnu.org>
26-
License: GNU-All-permissive-License
27-
2820

2921
Files: src/qt/res/icons/proxy.png
3022
src/qt/res/src/proxy.svg
@@ -56,12 +48,6 @@ License: Expat
5648
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
5749
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5850

59-
License: GNU-All-permissive-License
60-
Copying and distribution of this file, with or without modification, are
61-
permitted in any medium without royalty provided the copyright notice
62-
and this notice are preserved. This file is offered as-is, without any
63-
warranty.
64-
6551
License: GPL-2+
6652
This program is free software; you can redistribute it and/or modify it
6753
under the terms of the GNU General Public License as published by the

doc/build-windows.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Below are some notes on how to build Dash Core for Windows.
66
The options known to work for building Dash Core on Windows are:
77

88
* On Linux, using the [Mingw-w64](https://www.mingw-w64.org/) cross compiler tool chain.
9-
* On Windows, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/windows/wsl/about) and Mingw-w64.
9+
* On Windows, using [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/about) and Mingw-w64.
1010

1111
Other options which may work, but which have not been extensively tested are (please contribute instructions):
1212

@@ -18,7 +18,7 @@ package meets the minimum required `g++` version specified in [dependencies.md](
1818
Installing Windows Subsystem for Linux
1919
---------------------------------------
2020

21-
Follow the upstream installation instructions, available [here](https://docs.microsoft.com/windows/wsl/install-win10).
21+
Follow the upstream installation instructions, available [here](https://learn.microsoft.com/en-us/windows/wsl/install).
2222

2323
Cross-compilation
2424
-------------------
@@ -34,7 +34,7 @@ Note that for WSL the Dash Core source path MUST be somewhere in the default mou
3434
example /usr/src/dash, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail.
3535
This means you cannot use a directory that is located directly on the host Windows file system to perform the build.
3636

37-
Additional WSL Note: WSL support for [launching Win32 applications](https://docs.microsoft.com/en-us/archive/blogs/wsl/windows-and-ubuntu-interoperability#launching-win32-applications-from-within-wsl)
37+
Additional WSL Note: WSL support for [launching Win32 applications](https://learn.microsoft.com/en-us/archive/blogs/wsl/windows-and-ubuntu-interoperability#launching-win32-applications-from-within-wsl)
3838
results in `Autoconf` configure scripts being able to execute Windows Portable Executable files. This can cause
3939
unexpected behaviour during the build, such as Win32 error dialogs for missing libraries. The recommended approach
4040
is to temporarily disable WSL support for Win32 applications.

doc/fuzzing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ $ sudo apt-get install libtool libtool-bin wget automake autoconf bison gdb
279279
```
280280
281281
At this point, you must install the .NET core. The process differs, depending on your Linux distribution.
282-
See [this link](https://docs.microsoft.com/en-us/dotnet/core/install/linux) for details.
283-
On ubuntu 20.04, the following should work:
282+
See [this link](https://learn.microsoft.com/en-us/dotnet/core/install/linux) for details.
283+
On Ubuntu 20.04, the following should work:
284284
285285
```sh
286286
$ wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb

doc/managing-wallets.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ In the RPC, the destination parameter must include the name of the file. Otherwi
9090
$ dash-cli -rpcwallet="wallet-01" backupwallet /home/node01/Backups/backup-01.dat
9191
```
9292

93-
In the GUI, the wallet is selected in the `Wallet` drop-down list in the upper right corner. If this list is not present, the wallet can be loaded in `File` ->`Open wallet` if necessary. Then, the backup can be done in `File` -> `Backup Wallet...`.
93+
In the GUI, the wallet is selected in the `Wallet` drop-down list in the upper right corner. If this list is not present, the wallet can be loaded in `File` ->`Open Wallet` if necessary. Then, the backup can be done in `File` -> `Backup Wallet`.
9494

9595
This backup file can be stored on one or multiple offline devices, which must be reliable enough to work in an emergency and be malware free. Backup files can be regularly tested to avoid problems in the future.
9696

@@ -110,7 +110,7 @@ Non-HD wallets must be backed up every 1000 keys used since the previous backup,
110110

111111
### 1.6 Restoring the Wallet From a Backup
112112

113-
To restore a wallet, the `restorewallet` RPC must be used.
113+
To restore a wallet, the `restorewallet` RPC or the `Restore Wallet` GUI menu item (`File` -> `Restore Wallet…`) must be used.
114114

115115
```
116116
$ dash-cli restorewallet "restored-wallet" /home/node01/Backups/backup-01.dat
@@ -122,4 +122,4 @@ After that, `getwalletinfo` can be used to check if the wallet has been fully re
122122
$ dash-cli -rpcwallet="restored-wallet" getwalletinfo
123123
```
124124

125-
The restored wallet can also be loaded in the GUI via `File` ->`Open wallet`.
125+
The restored wallet can also be loaded in the GUI via `File` ->`Open wallet`.

src/.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ modernize-use-default-member-init,
77
modernize-use-nullptr,
88
performance-for-range-copy,
99
performance-move-const-arg,
10+
performance-no-automatic-move,
1011
performance-unnecessary-copy-initialization,
1112
readability-const-return-type,
1213
readability-redundant-declaration,
@@ -19,6 +20,7 @@ misc-unused-using-decls,
1920
modernize-use-default-member-init,
2021
modernize-use-nullptr,
2122
performance-move-const-arg,
23+
performance-no-automatic-move,
2224
performance-unnecessary-copy-initialization,
2325
readability-redundant-declaration,
2426
readability-redundant-string-init,

src/addrman.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ std::pair<CAddress, NodeSeconds> AddrManImpl::SelectTriedCollision()
11951195
{
11961196
LOCK(cs);
11971197
Check();
1198-
const auto ret = SelectTriedCollision_();
1198+
auto ret = SelectTriedCollision_();
11991199
Check();
12001200
return ret;
12011201
}
@@ -1204,7 +1204,7 @@ std::pair<CAddress, NodeSeconds> AddrManImpl::Select(bool new_only, std::optiona
12041204
{
12051205
LOCK(cs);
12061206
Check();
1207-
const auto addrRet = Select_(new_only, network);
1207+
auto addrRet = Select_(new_only, network);
12081208
Check();
12091209
return addrRet;
12101210
}
@@ -1213,7 +1213,7 @@ std::vector<CAddress> AddrManImpl::GetAddr(size_t max_addresses, size_t max_pct,
12131213
{
12141214
LOCK(cs);
12151215
Check();
1216-
const auto addresses = GetAddr_(max_addresses, max_pct, network);
1216+
auto addresses = GetAddr_(max_addresses, max_pct, network);
12171217
Check();
12181218
return addresses;
12191219
}

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
852852
UniValue valReply(UniValue::VSTR);
853853
if (!valReply.read(response.body))
854854
throw std::runtime_error("couldn't parse reply from server");
855-
const UniValue reply = rh->ProcessReply(valReply);
855+
UniValue reply = rh->ProcessReply(valReply);
856856
if (reply.empty())
857857
throw std::runtime_error("expected reply to have result, error and id properties");
858858

src/bitcoin-util.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@ static int AppInitUtil(ArgsManager& args, int argc, char* argv[])
7777
return CONTINUE_EXECUTION;
7878
}
7979

80-
static void grind_task(uint32_t nBits, CBlockHeader& header_orig, uint32_t offset, uint32_t step, std::atomic<bool>& found)
80+
static void grind_task(uint32_t nBits, CBlockHeader header, uint32_t offset, uint32_t step, std::atomic<bool>& found, uint32_t& proposed_nonce)
8181
{
8282
arith_uint256 target;
8383
bool neg, over;
8484
target.SetCompact(nBits, &neg, &over);
8585
if (target == 0 || neg || over) return;
86-
CBlockHeader header = header_orig; // working copy
8786
header.nNonce = offset;
8887

8988
uint32_t finish = std::numeric_limits<uint32_t>::max() - step;
@@ -94,7 +93,7 @@ static void grind_task(uint32_t nBits, CBlockHeader& header_orig, uint32_t offse
9493
do {
9594
if (UintToArith256(header.GetHash()) <= target) {
9695
if (!found.exchange(true)) {
97-
header_orig.nNonce = header.nNonce;
96+
proposed_nonce = header.nNonce;
9897
}
9998
return;
10099
}
@@ -118,16 +117,19 @@ static int Grind(const std::vector<std::string>& args, std::string& strPrint)
118117

119118
uint32_t nBits = header.nBits;
120119
std::atomic<bool> found{false};
120+
uint32_t proposed_nonce{};
121121

122122
std::vector<std::thread> threads;
123123
int n_tasks = std::max(1u, std::thread::hardware_concurrency());
124124
for (int i = 0; i < n_tasks; ++i) {
125-
threads.emplace_back( grind_task, nBits, std::ref(header), i, n_tasks, std::ref(found) );
125+
threads.emplace_back(grind_task, nBits, header, i, n_tasks, std::ref(found), std::ref(proposed_nonce));
126126
}
127127
for (auto& t : threads) {
128128
t.join();
129129
}
130-
if (!found) {
130+
if (found) {
131+
header.nNonce = proposed_nonce;
132+
} else {
131133
strPrint = "Could not satisfy difficulty target";
132134
return EXIT_FAILURE;
133135
}

0 commit comments

Comments
 (0)