clang-tidy: Fix critical warnings

The std::move in coinstatsindex was not necessary since it was passed as a const reference argument.

The other change in the utxo supply fuzz test changes a line that seems to have triggered a false alarm.
This commit is contained in:
Fabian Jahr 2025-09-04 18:34:58 +02:00
parent 54dc34ec22
commit c767974811
No known key found for this signature in database
GPG Key ID: F13D1E9D890798CD
2 changed files with 3 additions and 3 deletions

View File

@ -256,7 +256,7 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block)
return false;
}
batch.Write(DBHashKey(value.first), std::move(value.second));
batch.Write(DBHashKey(value.first), value.second);
return true;
}

View File

@ -153,7 +153,7 @@ FUZZ_TARGET(utxo_total_supply)
node::RegenerateCommitments(*current_block, chainman);
const bool was_valid = !MineBlock(node, current_block).IsNull();
const auto prev_utxo_stats = utxo_stats;
const uint256 prev_hash_serialized{utxo_stats.hashSerialized};
if (was_valid) {
if (duplicate_coinbase_height == ActiveHeight()) {
// we mined the duplicate coinbase
@ -167,7 +167,7 @@ FUZZ_TARGET(utxo_total_supply)
if (!was_valid) {
// utxo stats must not change
assert(prev_utxo_stats.hashSerialized == utxo_stats.hashSerialized);
assert(prev_hash_serialized == utxo_stats.hashSerialized);
}
current_block = PrepareNextBlock();