Skip to content

Commit 445300c

Browse files
Merge #6827: backport: auto 20250821
1c8c746 test: remove unused EncodeDecimal from test framework util (pasta) 4ffee8c Merge bitcoin#28014: ci: re-enable gui tests for s390x (PastaBot) 479c23b Merge bitcoin#29481: doc: Update OpenBSD build docs for 7.4 (PastaBot) 265eebd Merge bitcoin#29470: test: Add option to skip python unit tests (PastaBot) 33a294a Merge bitcoin#29469: doc: document preference for list-initialization (PastaBot) 7bb828b Merge bitcoin#29456: docs: ci multi-arch requires qemu (PastaBot) 6640a79 Merge bitcoin#29243: wallet: Reset chain notifications handler if AttachChain fails (PastaBot) e26ae22 Merge bitcoin#29235: doc: refer to "Node relay options" in policy/README (PastaBot) cbd2802 Merge bitcoin#29237: depends: Allow PATH with spaces in directory names. (PastaBot) 92742d8 Merge bitcoin#27928: test: Add more tests for the BIP21 implementation (PastaBot) d6a4ff5 Merge bitcoin#28040: wallet: sqlite: don't include sqlite files from our headers (PastaBot) 0a4441e Merge bitcoin-core/gui#719: Remove confusing "Dust" label from coincontrol / sendcoins dialog (PastaBot) 23c0ea2 Merge bitcoin#28011: test: Rename EncodeDecimal to serialization_fallback (PastaBot) 8b77a80 Merge bitcoin#27530: Remove now-unnecessary poll, fcntl includes from net(base).cpp (PastaBot) 5030a4d Merge bitcoin#27947: MaybePunishNodeForTx: Remove unused message arg and logging (PastaBot) 56686df Merge bitcoin#27949: http: update libevent workaround to correct version (PastaBot) c060a2a Merge bitcoin#27689: doc: remove mention of glibc 2.10+ (PastaBot) Pull request description: ## Issue being fixed or feature implemented Batch of automatically done backports by claude. ## What was done? See commits ## How Has This Been Tested? CI ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] 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 _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 1c8c746 Tree-SHA512: 8b9487375093de53dca15b15eadfb7a34b6319dd367bd204d71e0407316db891f71ba33f97327ed021423ee060cd7f095313018d80b3e526527c43ea0f8cb167
2 parents b4999d7 + 1c8c746 commit 445300c

25 files changed

+91
-154
lines changed

ci/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ testing compared to other parts of the codebase. If you want to keep the work tr
1515
system in a virtual machine with a Linux operating system of your choice.
1616

1717
To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
18-
requires `docker` to be installed. To install all requirements on Ubuntu, run
18+
requires `docker` to be installed. To run on different architectures than the host `qemu` is also required. To install all requirements on Ubuntu, run
1919

2020
```
21-
sudo apt install docker.io bash
21+
sudo apt install docker.io bash qemu-user-static
2222
```
2323

2424
To run the default test stage,

ci/test/00_setup_env_s390x.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ export RUN_UNIT_TESTS=true
2222
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
2323
export RUN_FUNCTIONAL_TESTS=true
2424
export GOAL="install"
25-
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --with-boost-process" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730
25+
export BITCOIN_CONFIG="--enable-reduce-exports --with-boost-process"

depends/funcs.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
138138
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
139139
$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
140140
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
141-
$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
142-
$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
143-
$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
141+
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
142+
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
143+
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
144144

145145
# Setting a --build type that differs from --host will explicitly enable
146146
# cross-compilation mode. Note that --build defaults to the output of

doc/build-openbsd.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OpenBSD build guide
22
======================
3-
(updated for OpenBSD 6.7)
3+
**Updated for OpenBSD [7.4](https://www.openbsd.org/74.html)**
44

55
This guide describes how to build dashd, dash-qt, and command-line utilities on OpenBSD.
66

@@ -40,6 +40,8 @@ from ports, for the same reason as boost above (g++/libstd++ incompatibility).
4040
If you have to build it yourself, you can use [the installation script included
4141
in contrib/](/contrib/install_db4.sh) like so:
4242

43+
Refer to [depends/README.md](/depends/README.md) for detailed instructions.
44+
4345
```bash
4446
./contrib/install_db4.sh `pwd` CC=cc CXX=c++
4547
```

doc/developer-notes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ code.
110110
- `nullptr` is preferred over `NULL` or `(void*)0`.
111111
- `static_assert` is preferred over `assert` where possible. Generally; compile-time checking is preferred over run-time checking.
112112
- Align pointers and references to the left i.e. use `type& var` and not `type &var`.
113+
- Prefer [`list initialization ({})`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list) where possible.
114+
For example `int x{0};` instead of `int x = 0;` or `int x(0);`
113115

114116
For function calls a namespace should be specified explicitly, unless such functions have been declared within it.
115117
Otherwise, [argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl), also known as ADL, could be
@@ -135,7 +137,7 @@ int main()
135137
136138
Block style example:
137139
```c++
138-
int g_count = 0;
140+
int g_count{0};
139141
140142
namespace foo {
141143
class Class
@@ -147,7 +149,7 @@ public:
147149
{
148150
// Comment summarising what this section of code does
149151
for (int i = 0; i < n; ++i) {
150-
int total_sum = 0;
152+
int total_sum{0};
151153
// When something fails, return early
152154
if (!Something()) return false;
153155
...

doc/policy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
**Policy** (Mempool or Transaction Relay Policy) is the node's set of validation rules, in addition
44
to consensus, enforced for unconfirmed transactions before submitting them to the mempool. These
5-
rules are local to the node and configurable (e.g. `-minrelaytxfee`, `-limitancestorsize`,
6-
`-incrementalRelayFee`). Policy may include restrictions on the transaction itself, the transaction
5+
rules are local to the node and configurable, see "Node relay options" when running `-help`.
6+
Policy may include restrictions on the transaction itself, the transaction
77
in relation to the current chain tip, and the transaction in relation to the node's mempool
88
contents. Policy is *not* applied to transactions in blocks.
99

doc/reduce-memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ threads take up 8MiB for the thread stack on a 64-bit system, and 4MiB in a
4343

4444
## Linux specific
4545

46-
By default, glibc's implementation of `malloc` may use more than one arena. This is known to cause excessive memory usage in some scenarios. To avoid this, make a script that sets `MALLOC_ARENA_MAX` before starting dashd:
46+
By default, glibc will create up to two heap arenas per core. This is known to cause excessive memory usage in some scenarios. To avoid this make a script that sets `MALLOC_ARENA_MAX` before starting dashd:
4747

4848
```bash
4949
#!/usr/bin/env bash

src/httpserver.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,10 @@ std::string RequestMethodString(HTTPRequest::RequestMethod m)
219219
/** HTTP request callback */
220220
static void http_request_cb(struct evhttp_request* req, void* arg)
221221
{
222-
// Disable reading to work around a libevent bug, fixed in 2.2.0.
223-
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) {
222+
// Disable reading to work around a libevent bug, fixed in 2.1.9
223+
// See https://github.com/libevent/libevent/commit/5ff8eb26371c4dc56f384b2de35bea2d87814779
224+
// and https://github.com/bitcoin/bitcoin/pull/11593.
225+
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02010900) {
224226
evhttp_connection* conn = evhttp_request_get_connection(req);
225227
if (conn) {
226228
bufferevent* bev = evhttp_connection_get_bufferevent(conn);
@@ -616,7 +618,7 @@ void HTTPRequest::WriteReply(int nStatus, const std::string& strReply)
616618
evhttp_send_reply(req_copy, nStatus, nullptr, nullptr);
617619
// Re-enable reading from the socket. This is the second part of the libevent
618620
// workaround above.
619-
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) {
621+
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02010900) {
620622
evhttp_connection* conn = evhttp_request_get_connection(req_copy);
621623
if (conn) {
622624
bufferevent* bev = evhttp_connection_get_bufferevent(conn);

src/net.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848

4949
#ifdef WIN32
5050
#include <string.h>
51-
#else
52-
#include <fcntl.h>
5351
#endif
5452

5553
#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS

src/net_processing.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class PeerManagerImpl final : public PeerManager
695695
*
696696
* Changes here may need to be reflected in TxRelayMayResultInDisconnect().
697697
*/
698-
bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message = "")
698+
bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state)
699699
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
700700

701701
/** Maybe disconnect a peer and discourage future connections from its address.
@@ -1872,15 +1872,15 @@ bool PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidati
18721872
return false;
18731873
}
18741874

1875-
bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message) {
1875+
bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state) {
18761876
switch (state.GetResult()) {
18771877
case TxValidationResult::TX_RESULT_UNSET:
18781878
break;
18791879
// The node is providing invalid data:
18801880
case TxValidationResult::TX_CONSENSUS:
18811881
{
18821882
LOCK(cs_main);
1883-
Misbehaving(nodeid, 100, message);
1883+
Misbehaving(nodeid, 100);
18841884
return true;
18851885
}
18861886
// Conflicting (but not necessarily invalid) data or different policy:
@@ -1897,9 +1897,6 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
18971897
case TxValidationResult::TX_CONFLICT_LOCK:
18981898
break;
18991899
}
1900-
if (message != "") {
1901-
LogPrint(BCLog::NET, "peer=%d: %s\n", nodeid, message);
1902-
}
19031900
return false;
19041901
}
19051902

0 commit comments

Comments
 (0)