Skip to content

Commit c353016

Browse files
2ff28c6 Merge bitcoin#26589: test: small fixups/improvements for get_previous_releases.py (MarcoFalke) 5db1752 Merge bitcoin#25782: test: check that `verifymessage` RPC fails for non-P2PKH addresses (Andrew Chow) b838b60 Merge bitcoin#25869: wallet: remove UNKNOWN type from OUTPUT_TYPES array (Andrew Chow) f093843 Merge bitcoin#25642: Don't wrap around when deriving an extended key at a too large depth (Andrew Chow) 4d0373f Merge bitcoin#25760: rest: clean-up for `mempool` endpoints (MacroFake) 46a187a Merge bitcoin#25650: script: default to necessary tags in `test/get_previous_releases.py` (MacroFake) e378eeb Merge bitcoin#23703: scripted-diff: Use named args in RPC docs (fanquake) 6531d8f Merge bitcoin#25829: build: include share/rpcauth in release tarball (fanquake) 0beeb91 Merge bitcoin#25709: script: actually trigger the optimization in BuildScript (MacroFake) 7601680 Merge bitcoin#24860: Miniscript integration follow-ups (fanquake) Pull request description: ## What was done? Regular backports from Bitcoin Core v24 ## How Has This Been Tested? 1. Run unit & functional tests. 2. Run `test/get_previous_releases.py -b` - it works ## 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 2ff28c6 Tree-SHA512: 0503b053823f3c0b5c52caa21b1419d36037f31e6e3bde0bec27b432f50e0d8ed7d16195f891fd814cc5da0b5b23cf1b694b28ba0c4503f317b09d89e5c9f881
2 parents 3dd74c6 + 2ff28c6 commit c353016

27 files changed

+664
-456
lines changed

ci/dash/test_integrationtests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ fi
2020

2121
export LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib
2222

23-
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
24-
echo "Downloading previous releases: $PREVIOUS_RELEASES_TO_DOWNLOAD"
23+
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
24+
echo "Downloading previous releases..."
2525
# shellcheck disable=SC2086
26-
./test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" ${PREVIOUS_RELEASES_TO_DOWNLOAD}
26+
./test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
2727
fi
2828

2929
cd "build-ci/dashcore-$BUILD_TARGET"

ci/test/00_setup_env_native_qt5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude fe
1414
export RUN_UNIT_TESTS_SEQUENTIAL="true"
1515
export RUN_UNIT_TESTS="false"
1616
export GOAL="install"
17-
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.12.1.5 v0.15.0.0 v0.16.1.1 v0.17.0.3 v18.2.2 v19.3.0 v20.1.1 v21.1.1"
17+
export DOWNLOAD_PREVIOUS_RELEASES="true"
1818
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports LDFLAGS=-static-libstdc++ --with-boost-process"

ci/test/05_before_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ if [ -z "$NO_DEPENDS" ]; then
3030
fi
3131
CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
3232
fi
33-
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
34-
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
33+
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
34+
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
3535
fi

contrib/guix/libexec/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ mkdir -p "$DISTSRC"
357357
# has not been run before buildling, this file will be a stub
358358
cp "${DISTSRC}/contrib/debian/examples/dash.conf" "${DISTNAME}/"
359359

360+
cp -r "${DISTSRC}/share/rpcauth" "${DISTNAME}/share/"
361+
360362
# Finally, deterministically produce {non-,}debug binary tarballs ready
361363
# for release
362364
case "$HOST" in

share/setup.nsi.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Section -Main SEC0000
7575
File @abs_top_builddir@/release/@BITCOIN_GUI_NAME@@EXEEXT@
7676
File /oname=COPYING.txt @abs_top_srcdir@/COPYING
7777
File /oname=readme.txt @abs_top_srcdir@/doc/README_windows.txt
78+
File @abs_top_srcdir@/contrib/debian/examples/dash.conf
79+
SetOutPath $INSTDIR\share\rpcauth
80+
File @abs_top_srcdir@/share/rpcauth/*.*
7881
SetOutPath $INSTDIR\daemon
7982
File @abs_top_builddir@/release/@BITCOIN_DAEMON_NAME@@EXEEXT@
8083
File @abs_top_builddir@/release/@BITCOIN_CLI_NAME@@EXEEXT@
@@ -127,6 +130,8 @@ Section /o -un.Main UNSEC0000
127130
Delete /REBOOTOK $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
128131
Delete /REBOOTOK $INSTDIR\COPYING.txt
129132
Delete /REBOOTOK $INSTDIR\readme.txt
133+
Delete /REBOOTOK $INSTDIR\dash.conf
134+
RMDir /r /REBOOTOK $INSTDIR\share
130135
RMDir /r /REBOOTOK $INSTDIR\daemon
131136
DeleteRegValue HKCU "${REGKEY}\Components" Main
132137
SectionEnd

src/Makefile.test.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ test_fuzz_fuzz_SOURCES = \
321321
test/fuzz/locale.cpp \
322322
test/fuzz/merkleblock.cpp \
323323
test/fuzz/message.cpp \
324-
test/fuzz/miniscript_decode.cpp \
324+
test/fuzz/miniscript.cpp \
325325
test/fuzz/minisketch.cpp \
326326
test/fuzz/muhash.cpp \
327327
test/fuzz/multiplication_overflow.cpp \

src/key.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ ECDHSecret CKey::ComputeBIP324ECDHSecret(const EllSwiftPubKey& their_ellswift, c
341341
}
342342

343343
bool CExtKey::Derive(CExtKey &out, unsigned int _nChild) const {
344+
if (nDepth == std::numeric_limits<unsigned char>::max()) return false;
344345
out.nDepth = nDepth + 1;
345346
CKeyID id = key.GetPubKey().GetID();
346347
memcpy(out.vchFingerprint, &id, 4);

src/key.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class CKey
135135
bool SignCompact(const uint256& hash, std::vector<unsigned char>& vchSig) const;
136136

137137
//! Derive BIP32 child key.
138-
bool Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
138+
[[nodiscard]] bool Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
139139

140140
/**
141141
* Verify thoroughly whether a private key and a public key match.
@@ -186,7 +186,7 @@ struct CExtKey {
186186

187187
void Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const;
188188
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
189-
bool Derive(CExtKey& out, unsigned int nChild) const;
189+
[[nodiscard]] bool Derive(CExtKey& out, unsigned int nChild) const;
190190
CExtPubKey Neuter() const;
191191
void SetSeed(Span<const std::byte> seed);
192192
};

src/outputtype.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
static const std::string OUTPUT_TYPE_STRING_LEGACY = "legacy";
1919
static const std::string OUTPUT_TYPE_STRING_UNKNOWN = "unknown";
2020

21-
const std::array<OutputType, 2> OUTPUT_TYPES = {OutputType::LEGACY, OutputType::UNKNOWN};
21+
const std::array<OutputType, 1> OUTPUT_TYPES = {OutputType::LEGACY};
2222

2323
bool ParseOutputType(const std::string& type, OutputType& output_type)
2424
{

src/outputtype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ enum class OutputType {
1818
UNKNOWN,
1919
};
2020

21-
extern const std::array<OutputType, 2> OUTPUT_TYPES;
21+
extern const std::array<OutputType, 1> OUTPUT_TYPES;
2222

2323
[[nodiscard]] bool ParseOutputType(const std::string& str, OutputType& output_type);
2424
const std::string& FormatOutputType(OutputType type);

0 commit comments

Comments
 (0)