Fixed implicit widening multiplication error, Removed unused "this", Fixed narrowing conversion, Made m_verified and m_invalid mutable, Removed else-after-return, Removed unused num_full_blocks and last_block_size var all to make clang-tidy happy

This commit is contained in:
Matt Hess
2025-12-18 00:52:40 +00:00
parent 9266f28d22
commit 4ddfa22d1b
8 changed files with 75 additions and 49 deletions
+4 -4
View File
@@ -1431,10 +1431,10 @@ hash BlockTemplate::calc_miner_tx_hash(uint32_t extra_nonce) const
char prunable_hash_hex[65] = {0};
char final_hash_hex[65] = {0};
for (int i = 0; i < 32; ++i) {
snprintf(prefix_hash_hex + i*2, 3, "%02x", hashes[i]);
snprintf(base_rct_hash_hex + i*2, 3, "%02x", hashes[32 + i]);
snprintf(prunable_hash_hex + i*2, 3, "%02x", hashes[64 + i]);
snprintf(final_hash_hex + i*2, 3, "%02x", result.h[i]);
snprintf(prefix_hash_hex + static_cast<size_t>(i) * 2, 3, "%02x", hashes[i]);
snprintf(base_rct_hash_hex + static_cast<size_t>(i) * 2, 3, "%02x", hashes[32 + i]);
snprintf(prunable_hash_hex + static_cast<size_t>(i) * 2, 3, "%02x", hashes[64 + i]);
snprintf(final_hash_hex + static_cast<size_t>(i) * 2, 3, "%02x", result.h[i]);
}
LOGINFO(3, "Miner TX hash components:");
LOGINFO(3, " Prefix hash: " << static_cast<const char*>(prefix_hash_hex));