mirror of https://github.com/bitcoin/bitcoin.git
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:
parent
54dc34ec22
commit
c767974811
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue