fix one critical bug and mostly code quality/cleanup items for portability, minor cleanup for compile on mac, fixed null check, Remove redundant TX_VERSION check
This commit is contained in:
+2
-7
@@ -958,7 +958,8 @@ bool SideChain::get_outputs_blob(PoolBlock* block, uint64_t total_reward, std::v
|
||||
const PoolBlock::TxOutput& output = block->m_outputAmounts[i];
|
||||
writeVarint(output.m_reward, blob);
|
||||
blob.emplace_back(TXOUT_TO_CARROT_V1);
|
||||
blob.insert(blob.end(), block->m_ephPublicKeys[i].h, block->m_ephPublicKeys[i].h + HASH_SIZE);
|
||||
const hash eph_key = block->m_ephPublicKeys[i];
|
||||
blob.insert(blob.end(), eph_key.h, eph_key.h + HASH_SIZE);
|
||||
// Carrot v1 format
|
||||
blob.push_back(4);
|
||||
blob.push_back('S');
|
||||
@@ -3458,12 +3459,6 @@ bool SideChain::validate_loaded_checkpoints()
|
||||
|
||||
PoolBlock* block = const_cast<PoolBlock*>(found);
|
||||
|
||||
if (!block) {
|
||||
// Block not yet synced but reachable - can't validate yet
|
||||
LOGWARN(3, "Checkpoint at height " << cp.height << " not yet synced, deferring validation - mining blocked");
|
||||
return false; // NOT safe to mine yet
|
||||
}
|
||||
|
||||
if (block->m_sidechainId != cp.id) {
|
||||
LOGWARN(0, "CHECKPOINT MISMATCH at height " << cp.height <<
|
||||
": cached=" << cp.id <<
|
||||
|
||||
Reference in New Issue
Block a user