Merge 22025d06e5 into merged_master (Bitcoin PR bitcoin/bitcoin#28605)

This commit is contained in:
Byron Hambly 2025-11-10 14:17:41 +02:00
commit 8556ebfa64
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
19 changed files with 20 additions and 19 deletions

View file

@ -2453,7 +2453,7 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic
// of transactions relevant to them, without having to download the
// entire memory pool.
// Also, other nodes can use these messages to automatically request a
// transaction from some other peer that annnounced it, and stop
// transaction from some other peer that announced it, and stop
// waiting for us to respond.
// In normal operation, we often send NOTFOUND messages for parents of
// transactions that we relay; if a peer is missing a parent, they may

View file

@ -221,7 +221,7 @@ public:
// If a status update is needed (blocks came in since last check),
// try to update the status of this transaction from the wallet.
// Otherwise, simply re-use the cached status.
// Otherwise, simply reuse the cached status.
interfaces::WalletTxStatus wtx;
int numBlocks;
int64_t block_time;

View file

@ -409,7 +409,7 @@ static inline JSONRPCRequest transformNamedArguments(const JSONRPCRequest& in, c
}
// Process expected parameters. If any parameters were left unspecified in
// the request before a parameter that was specified, null values need to be
// inserted at the unspecifed parameter positions, and the "hole" variable
// inserted at the unspecified parameter positions, and the "hole" variable
// below tracks the number of null values that need to be inserted.
// The "initial_hole_size" variable stores the size of the initial hole,
// i.e. how many initial positional arguments were left unspecified. This is

View file

@ -1105,7 +1105,7 @@ UniValue RPCResult::MatchesType(const UniValue& result) const
// if (UniValue::VARR == result.getType()) {
// UniValue errors(UniValue::VOBJ);
// for (size_t i{0}; i < result.get_array().size(); ++i) {
// // If there are more results than documented, re-use the last doc_inner.
// // If there are more results than documented, reuse the last doc_inner.
// const RPCResult& doc_inner{m_inner.at(std::min(m_inner.size() - 1, i))};
// UniValue match{doc_inner.MatchesType(result.get_array()[i])};
// if (!match.isTrue()) errors.pushKV(strprintf("%d", i), match);

View file

@ -158,7 +158,7 @@ FuzzedDataProvider::ConsumeRandomLengthString(size_t max_length) {
// picking its contents.
std::string result;
// Reserve the anticipated capaticity to prevent several reallocations.
// Reserve the anticipated capacity to prevent several reallocations.
result.reserve(std::min(max_length, remaining_bytes_));
for (size_t i = 0; i < max_length && remaining_bytes_ != 0; ++i) {
char next = ConvertUnsignedToSigned<char>(data_ptr_[0]);

View file

@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
}
SignatureData empty;
BOOST_CHECK(SignSignature(keystore, *txPrev, tx, 0, SIGHASH_ALL, empty));
// Re-use same signature for other inputs
// Reuse same signature for other inputs
// (they don't have to be valid for this test)
for (unsigned int j = 1; j < tx.vin.size(); j++)
tx.vin[j].scriptSig = tx.vin[0].scriptSig;

View file

@ -1154,7 +1154,7 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
keys.clear();
keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
keys.push_back(key2); keys.push_back(key2); // Can't reuse sig
CScript badsig1 = sign_multisig(scriptPubKey23, keys, CTransaction(txTo23));
BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, nullptr, gFlags, MutableTransactionSignatureChecker(&txTo23, 0, txFrom23.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), &err));
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));

View file

@ -424,7 +424,7 @@ BOOST_AUTO_TEST_CASE(versionbits_computeblockversion)
uint32_t chain_all_vbits{0};
for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++i) {
const auto dep = static_cast<Consensus::DeploymentPos>(i);
// Check that no bits are re-used (within the same chain). This is
// Check that no bits are reused (within the same chain). This is
// disallowed because the transition to FAILED (on timeout) does
// not take precedence over STARTED/LOCKED_IN. So all softforks on
// the same bit might overlap, even when non-overlapping start-end

View file

@ -251,7 +251,7 @@ std::map<std::string,std::string> ParseTorReplyMapping(const std::string &s)
/**
* Unescape value. Per https://spec.torproject.org/control-spec section 2.1.1:
*
* For future-proofing, controller implementors MAY use the following
* For future-proofing, controller implementers MAY use the following
* rules to be compatible with buggy Tor implementations and with
* future ones that implement the spec as intended:
*

View file

@ -534,7 +534,7 @@ public:
void removeRecursive(const CTransaction& tx, MemPoolRemovalReason reason) EXCLUSIVE_LOCKS_REQUIRED(cs);
/** After reorg, filter the entries that would no longer be valid in the next block, and update
* the entries' cached LockPoints if needed. The mempool does not have any knowledge of
* consensus rules. It just appplies the callable function and removes the ones for which it
* consensus rules. It just applies the callable function and removes the ones for which it
* returns true.
* @param[in] filter_final_and_mature Predicate that checks the relevant validation rules
* and updates an entry's LockPoints.

View file

@ -171,7 +171,7 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
return Result::INVALID_PARAMETER;
}
// We are going to modify coin control later, copy to re-use
// We are going to modify coin control later, copy to reuse
CCoinControl new_coin_control(coin_control);
LOCK(wallet.cs_wallet);

View file

@ -1991,7 +1991,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
}
// Before we return success, we assume any change key will be used to prevent
// accidental re-use.
// accidental reuse.
for (auto& reservedest_ : reservedest) {
reservedest_->KeepDestination();
}
@ -2045,7 +2045,7 @@ util::Result<CreatedTransactionResult> CreateTransaction(
tmp_cc.m_avoid_partial_spends = true;
// ELEMENTS: only for unblinded transactions
// Re-use the change destination from the first creation attempt to avoid skipping BIP44 indexes
// Reuse the change destination from the first creation attempt to avoid skipping BIP44 indexes
const int ungrouped_change_pos = txr_ungrouped.change_pos;
if (ungrouped_change_pos != -1 && !blind_details) {
const CAsset& asset = txr_ungrouped.tx->vout[ungrouped_change_pos].nAsset.GetAsset();

View file

@ -218,7 +218,7 @@ static const std::map<std::string,WalletFlags> WALLET_FLAG_MAP{
* Instantiating a ReserveDestination does not reserve an address. To do so,
* GetReservedDestination() needs to be called on the object. Once an address has been
* reserved, call KeepDestination() on the ReserveDestination object to make sure it is not
* returned. Call ReturnDestination() to return the address so it can be re-used (for
* returned. Call ReturnDestination() to return the address so it can be reused (for
* example, if the address was used in a new transaction
* and that transaction was not completed and needed to be aborted).
*