diff options
author | Javier Smooth <iamjaviersmooth@gmail.com> | 2015-11-13 00:24:47 -0800 |
---|---|---|
committer | Javier Smooth <iamjaviersmooth@gmail.com> | 2015-11-13 00:37:35 -0800 |
commit | baf101ef4a05ae4d24ed717c16be929456775969 (patch) | |
tree | 807afcbc2d1faf2f792a774d72a62ee835934092 /src/cryptonote_core/blockchain_storage.cpp | |
parent | Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block v... (diff) | |
download | monero-baf101ef4a05ae4d24ed717c16be929456775969.tar.xz |
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
Diffstat (limited to 'src/cryptonote_core/blockchain_storage.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain_storage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp index fb06da48a..f7c9ffb78 100644 --- a/src/cryptonote_core/blockchain_storage.cpp +++ b/src/cryptonote_core/blockchain_storage.cpp @@ -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; |