More changes for 2-min blocks
Use the correct block time for realtime fuzz on locktime Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting) Lock unit tests to original block time for now
This commit is contained in:
@@ -430,7 +430,7 @@ difficulty_type blockchain_storage::get_difficulty_for_next_block() const
|
||||
timestamps.push_back(m_blocks[offset].bl.timestamp);
|
||||
commulative_difficulties.push_back(m_blocks[offset].cumulative_difficulty);
|
||||
}
|
||||
return next_difficulty(timestamps, commulative_difficulties);
|
||||
return next_difficulty(timestamps, commulative_difficulties,DIFFICULTY_TARGET_V1);
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
bool blockchain_storage::rollback_blockchain_switching(std::list<block>& original_chain, size_t rollback_height)
|
||||
@@ -571,7 +571,7 @@ difficulty_type blockchain_storage::get_next_difficulty_for_alternative_chain(co
|
||||
break;
|
||||
}
|
||||
}
|
||||
return next_difficulty(timestamps, commulative_difficulties);
|
||||
return next_difficulty(timestamps, commulative_difficulties,DIFFICULTY_TARGET_V1);
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
bool blockchain_storage::prevalidate_miner_transaction(const block& b, uint64_t height) const
|
||||
@@ -1505,7 +1505,7 @@ bool blockchain_storage::is_tx_spendtime_unlocked(uint64_t unlock_time) const
|
||||
{
|
||||
//interpret as time
|
||||
uint64_t current_time = static_cast<uint64_t>(time(NULL));
|
||||
if(current_time + CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS >= unlock_time)
|
||||
if(current_time + CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS_V1 >= unlock_time)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user