Fixed linker errors for coverage.yml action, Fixed reorder error for test-sync.yml, Fixed const issues for cppcheck.yml, removed unused log_category_prefix var, Renamed prefix to addr_prefix

This commit is contained in:
Matt Hess
2025-12-18 01:04:32 +00:00
parent 4ddfa22d1b
commit 328a145af7
3 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -281,7 +281,7 @@ bool SideChain::fill_sidechain_data(PoolBlock& block, std::vector<MinerShare>& s
// Don't create genesis block until initial peer sync has been attempted
// This prevents nodes from creating independent chains when starting simultaneously
if (!m_precalcFinished.load()) {
P2PServer* p2p = m_pool->p2p_server();
const P2PServer* p2p = m_pool->p2p_server();
if (p2p && (p2p->peer_list_size() > 0 || p2p->num_connections() > 0)) {
LOGINFO(5, "Waiting for initial peer sync before creating genesis block");
return false;
@@ -2769,7 +2769,7 @@ void SideChain::purge_sidechain()
WriteLock lock(m_sidechainLock);
// Free all block memory
for (auto& it : m_blocksById) {
for (const auto& it : m_blocksById) {
delete it.second;
}
@@ -3075,7 +3075,7 @@ void SideChain::update_checkpoints(uint64_t new_height)
}
// Find the block at checkpoint height
PoolBlock* block = find_verified_block_at_height(checkpoint_height);
const PoolBlock* block = find_verified_block_at_height(checkpoint_height);
if (block && block->m_verified) {
Checkpoint cp;
cp.height = checkpoint_height;
+4 -5
View File
@@ -200,7 +200,6 @@ bool Wallet::decode(const char* address)
// DEBUG: Print what we decoded
{
static constexpr char log_category_prefix[] = "Wallet ";
char spend_hex[65] = {0}, view_hex[65] = {0}, data_hex[200] = {0}, prefix_hex[20] = {0};
for (int i = 0; i < 32; i++) {
sprintf(spend_hex + static_cast<ptrdiff_t>(i)*2, "%02x", m_spendPublicKey.h[i]);
@@ -292,11 +291,11 @@ void Wallet::encode(char (&buf)[ADDRESS_LENGTH]) const
int data_index = 0;
// Write prefix as varint
uint64_t prefix = m_prefix;
uint64_t addr_prefix = m_prefix;
do {
data[data_index++] = static_cast<uint8_t>((prefix & 0x7F) | (prefix > 0x7F ? 0x80 : 0));
prefix >>= 7;
} while (prefix);
data[data_index++] = static_cast<uint8_t>((addr_prefix & 0x7F) | (addr_prefix > 0x7F ? 0x80 : 0));
addr_prefix >>= 7;
} while (addr_prefix);
// Write public keys
memcpy(data + data_index, m_spendPublicKey.h, HASH_SIZE);
+2
View File
@@ -67,6 +67,7 @@ set(SOURCES
../external/src/hardforks/hardforks.cpp
../src/block_cache.cpp
../src/block_template.cpp
../src/carrot_crypto.cpp
../src/crypto.cpp
../src/keccak.cpp
../src/log.cpp
@@ -79,6 +80,7 @@ set(SOURCES
../src/params.cpp
../src/pool_block.cpp
../src/pow_hash.cpp
../src/protocol_tx_hash.cpp
../src/side_chain.cpp
../src/stratum_server.cpp
../src/tcp_server.cpp