fixing C/C++ CI errors
This commit is contained in:
@@ -1246,10 +1246,6 @@ int BlockTemplate::create_miner_tx(const MinerData& data, const std::vector<Mine
|
||||
writeVarint(1, m_minerTx);
|
||||
|
||||
// amount_burnt = 20% of total block reward
|
||||
uint64_t miner_total = 0;
|
||||
for (size_t i = 0; i < num_outputs; ++i) {
|
||||
miner_total += m_rewards[i];
|
||||
}
|
||||
uint64_t amount_burnt = full_block_reward / 5;
|
||||
writeVarint(amount_burnt, m_minerTx);
|
||||
m_poolBlockTemplate->m_amountBurnt = amount_burnt;
|
||||
|
||||
@@ -82,7 +82,7 @@ static void debug_hex(const char* label, const uint8_t* data, size_t len)
|
||||
static constexpr char log_category_prefix[] = "CarrotCrypto ";
|
||||
char hex[130] = {0};
|
||||
for (size_t i = 0; i < len && i < 64; ++i) {
|
||||
sprintf(hex + i*2, "%02x", data[i]);
|
||||
snprintf(hex + i*2, 3, "%02x", data[i]);
|
||||
}
|
||||
LOGINFO(6, label << ": " << static_cast<const char*>(hex));
|
||||
}
|
||||
|
||||
+2
-2
@@ -179,7 +179,7 @@ bool Wallet::decode(const char* address)
|
||||
}
|
||||
|
||||
char hex_buf[32];
|
||||
snprintf(hex_buf, sizeof(hex_buf), "0x%lx", tag);
|
||||
snprintf(hex_buf, sizeof(hex_buf), "0x%llx", static_cast<unsigned long long>(tag));
|
||||
|
||||
m_prefix = tag;
|
||||
|
||||
@@ -211,7 +211,7 @@ bool Wallet::decode(const char* address)
|
||||
for (int i = 0; i < std::min(data_index, 80); i++) {
|
||||
sprintf(data_hex + i*2, "%02x", data[i]);
|
||||
}
|
||||
sprintf(prefix_hex, "0x%lx", m_prefix);
|
||||
sprintf(prefix_hex, "0x%llx", static_cast<unsigned long long>(m_prefix));
|
||||
LOGINFO(6, "decode varint_len=" << varint_len << " data_index=" << data_index << " prefix=" << static_cast<const char*>(prefix_hex));
|
||||
LOGINFO(6, "decode raw_data: " << static_cast<const char*>(data_hex));
|
||||
LOGINFO(6, "decode spend: " << static_cast<const char*>(spend_hex));
|
||||
|
||||
Reference in New Issue
Block a user