From 4e9fa922a2239a18b760ca848bfcd028c67f20b2 Mon Sep 17 00:00:00 2001 From: XfedeX Date: Sat, 14 Jan 2023 13:29:42 +0100 Subject: [PATCH] Match styling --- src/cryptonote_config.h | 2 +- src/cryptonote_core/blockchain.cpp | 4 ++-- src/cryptonote_core/cryptonote_tx_utils.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 246ba9555..146b22daa 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -40,9 +40,9 @@ #define CRYPTONOTE_MAX_TX_SIZE 1000000 #define CRYPTONOTE_MAX_TX_PER_BLOCK 0x10000000 #define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0 +#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V3 262800 // 6 months #define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V2 288 #define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW 60 -#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_LONG 262800 // 6 months #define CURRENT_TRANSACTION_VERSION 2 #define CURRENT_BLOCK_MAJOR_VERSION 7 #define CURRENT_BLOCK_MINOR_VERSION 7 diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 53ba1dbbc..b9d01f3ed 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1445,8 +1445,8 @@ bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height, if (hf_version >= HF_VERSION_LONG_UNLOCK) { - CHECK_AND_ASSERT_MES(b.miner_tx.unlock_time == height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_LONG, false, "coinbase transaction transaction has the wrong unlock time=" - << b.miner_tx.unlock_time << ", expected " << height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_LONG); + CHECK_AND_ASSERT_MES(b.miner_tx.unlock_time == height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V3, false, "coinbase transaction transaction has the wrong unlock time=" + << b.miner_tx.unlock_time << ", expected " << height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V3); } else if (hf_version >= HF_VERSION_FIXED_UNLOCK) { CHECK_AND_ASSERT_MES(b.miner_tx.unlock_time == height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V2, false, "coinbase transaction transaction has the wrong unlock time=" diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index 1998e7f8e..dd0b3cbcb 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -173,8 +173,8 @@ namespace cryptonote //lock if (hard_fork_version >= HF_VERSION_LONG_UNLOCK) { - tx.unlock_time = height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_LONG; - } else if (hard_fork_version >= HF_VERSION_FIXED_UNLOCK) + tx.unlock_time = height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V3; + } else if (hard_fork_version < HF_VERSION_LONG_UNLOCK && hard_fork_version >= HF_VERSION_FIXED_UNLOCK) { tx.unlock_time = height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V2; } else if (hard_fork_version < HF_VERSION_FIXED_UNLOCK && hard_fork_version >= HF_VERSION_DYNAMIC_UNLOCK)