Skip to content

Commit c767974

Browse files
committed
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.
1 parent 54dc34e commit c767974

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/index/coinstatsindex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block)
256256
return false;
257257
}
258258

259-
batch.Write(DBHashKey(value.first), std::move(value.second));
259+
batch.Write(DBHashKey(value.first), value.second);
260260
return true;
261261
}
262262

src/test/fuzz/utxo_total_supply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ FUZZ_TARGET(utxo_total_supply)
153153
node::RegenerateCommitments(*current_block, chainman);
154154
const bool was_valid = !MineBlock(node, current_block).IsNull();
155155

156-
const auto prev_utxo_stats = utxo_stats;
156+
const uint256 prev_hash_serialized{utxo_stats.hashSerialized};
157157
if (was_valid) {
158158
if (duplicate_coinbase_height == ActiveHeight()) {
159159
// we mined the duplicate coinbase
@@ -167,7 +167,7 @@ FUZZ_TARGET(utxo_total_supply)
167167

168168
if (!was_valid) {
169169
// utxo stats must not change
170-
assert(prev_utxo_stats.hashSerialized == utxo_stats.hashSerialized);
170+
assert(prev_hash_serialized == utxo_stats.hashSerialized);
171171
}
172172

173173
current_block = PrepareNextBlock();

0 commit comments

Comments
 (0)