Skip to content

Commit 4c26ed8

Browse files
Merge dashpay#6759: backport: 0.25 batch 327
cc88003 Merge bitcoin#23829: refactor: use braced init for integer literals instead of c style casts (PastaBot) b483600 Merge bitcoin#26851: ci: Remove unused busybox workaround (PastaBot) da416ac Merge bitcoin#27498: test: Remove unused sanitizer suppressions (PastaBot) faf9462 Merge bitcoin#26618: rpc: Prevent unloading a wallet when rescanning (PastaBot) 1474e9c Merge bitcoin#26328: doc: fix -netinfo relaytxes help (PastaBot) 7e5a9d0 Merge bitcoin#26020: test: Change coinselection parameter location to make tests independent (PastaBot) Pull request description: ## Issue being fixed or feature implemented ## What was done? ## How Has This Been Tested? ## Breaking Changes ## 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)_ Top commit has no ACKs. Tree-SHA512: 0193ff1bf6cfdc5efa008fe9162f778dd83c52c78711222f0c416bb05fa067def1900d28e9f96e838fff6dc334ea135a533c867c4d875aeb5d1e75ff74b2c5e5
2 parents 2518c1e + cc88003 commit 4c26ed8

27 files changed

+75
-63
lines changed

ci/test/04_install.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASa
3030
fi
3131

3232
export P_CI_DIR="$PWD"
33+
export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
3334

3435
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
3536
echo "Creating $DOCKER_NAME_TAG container to run in"
@@ -65,14 +66,16 @@ else
6566
fi
6667

6768
CI_EXEC () {
68-
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*"
69+
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
6970
}
7071
CI_EXEC_ROOT () {
71-
$DOCKER_CI_CMD_PREFIX_ROOT bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*"
72+
$DOCKER_CI_CMD_PREFIX_ROOT bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
7273
}
7374
export -f CI_EXEC
7475
export -f CI_EXEC_ROOT
7576

77+
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
78+
7679
if [ -n "$DPKG_ADD_ARCH" ]; then
7780
CI_EXEC_ROOT dpkg --add-architecture "$DPKG_ADD_ARCH"
7881
fi
@@ -127,12 +130,10 @@ fi
127130

128131
if [ "$USE_BUSY_BOX" = "true" ]; then
129132
echo "Setup to use BusyBox utils"
130-
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
131133
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
132-
# find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version)
133134
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
134135
# shellcheck disable=SC1010
135-
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done
136+
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \)\; do ln -s \$\(command -v busybox\) "${BINS_SCRATCH_DIR}/\$util"\; done
136137
# Print BusyBox version
137138
CI_EXEC patch --help
138139
fi

doc/release-notes-26618.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
RPC Wallet
2+
----------
3+
4+
- RPC `unloadwallet` now fails if a rescan is in progress. (#6759)

src/bench/coin_selection.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ static CAmount make_hard_case(int utxos, std::vector<OutputGroup>& utxo_pool)
9696
utxo_pool.clear();
9797
CAmount target = 0;
9898
for (int i = 0; i < utxos; ++i) {
99-
target += (CAmount)1 << (utxos+i);
100-
add_coin((CAmount)1 << (utxos+i), 2*i, utxo_pool);
101-
add_coin(((CAmount)1 << (utxos+i)) + ((CAmount)1 << (utxos-1-i)), 2*i + 1, utxo_pool);
99+
target += CAmount{1} << (utxos+i);
100+
add_coin(CAmount{1} << (utxos+i), 2*i, utxo_pool);
101+
add_coin((CAmount{1} << (utxos+i)) + (CAmount{1} << (utxos-1-i)), 2*i + 1, utxo_pool);
102102
}
103103
return target;
104104
}

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
668668
" send Time since last message sent to the peer, in seconds\n"
669669
" recv Time since last message received from the peer, in seconds\n"
670670
" txn Time since last novel transaction received from the peer and accepted into our mempool, in minutes\n"
671-
" \"*\" - the peer requested we not relay transactions to it (relaytxes is false)\n"
671+
" \"*\" - we do not relay transactions to this peer (relaytxes is false)\n"
672672
" blk Time since last novel block passing initial validity checks received from the peer, in minutes\n"
673673
" hb High-bandwidth BIP152 compact block relay\n"
674674
" \".\" (to) - we selected the peer as a high-bandwidth peer\n"

src/crypto/siphash.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ uint64_t SipHashUint256(uint64_t k0, uint64_t k1, const uint256& val)
119119
SIPROUND;
120120
SIPROUND;
121121
v0 ^= d;
122-
v3 ^= ((uint64_t)4) << 59;
122+
v3 ^= (uint64_t{4}) << 59;
123123
SIPROUND;
124124
SIPROUND;
125-
v0 ^= ((uint64_t)4) << 59;
125+
v0 ^= (uint64_t{4}) << 59;
126126
v2 ^= 0xFF;
127127
SIPROUND;
128128
SIPROUND;
@@ -159,7 +159,7 @@ uint64_t SipHashUint256Extra(uint64_t k0, uint64_t k1, const uint256& val, uint3
159159
SIPROUND;
160160
SIPROUND;
161161
v0 ^= d;
162-
d = (((uint64_t)36) << 56) | extra;
162+
d = ((uint64_t{36}) << 56) | extra;
163163
v3 ^= d;
164164
SIPROUND;
165165
SIPROUND;

src/cuckoocache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class cache
342342
collection_flags.setup(size);
343343
epoch_flags.resize(size);
344344
// Set to 45% as described above
345-
epoch_size = std::max((uint32_t)1, (45 * size) / 100);
345+
epoch_size = std::max(uint32_t{1}, (45 * size) / 100);
346346
// Initially set to wait for a whole epoch
347347
epoch_heuristic_counter = epoch_size;
348348
return size;

src/random.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class FastRandomContext
192192
return rand64() >> (64 - bits);
193193
} else {
194194
if (bitbuf_size < bits) FillBitBuffer();
195-
uint64_t ret = bitbuf & (~(uint64_t)0 >> (64 - bits));
195+
uint64_t ret = bitbuf & (~uint64_t{0} >> (64 - bits));
196196
bitbuf >>= bits;
197197
bitbuf_size -= bits;
198198
return ret;

src/script/interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ class CTransactionSignatureSerializer
14261426
// Serialize the nSequence
14271427
if (nInput != nIn && (fHashSingle || fHashNone))
14281428
// let the others update at will
1429-
::Serialize(s, (int)0);
1429+
::Serialize(s, int{0});
14301430
else
14311431
::Serialize(s, txTo.vin[nInput].nSequence);
14321432
}

src/test/checkqueue_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ static void Correct_Queue_range(std::vector<size_t> range)
193193
BOOST_AUTO_TEST_CASE(test_CheckQueue_Correct_Zero)
194194
{
195195
std::vector<size_t> range;
196-
range.push_back((size_t)0);
196+
range.push_back(size_t{0});
197197
Correct_Queue_range(range);
198198
}
199199
/** Test that 1 check is correct
200200
*/
201201
BOOST_AUTO_TEST_CASE(test_CheckQueue_Correct_One)
202202
{
203203
std::vector<size_t> range;
204-
range.push_back((size_t)1);
204+
range.push_back(size_t{1});
205205
Correct_Queue_range(range);
206206
}
207207
/** Test that MAX check is correct

src/test/fuzz/versionbits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class TestConditionChecker : public AbstractThresholdConditionChecker
5656

5757
bool Condition(int32_t version) const
5858
{
59-
uint32_t mask = ((uint32_t)1) << m_bit;
59+
uint32_t mask = (uint32_t{1}) << m_bit;
6060
return (((version & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (version & mask) != 0);
6161
}
6262

0 commit comments

Comments
 (0)