Mined money 6-months unlock window

pull/446/head
_XxFedexX_ 1 year ago
parent 009814647a
commit 92cfcf132e

@ -42,6 +42,7 @@
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
#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
@ -196,6 +197,7 @@
#define HF_VERSION_DETERMINISTIC_UNLOCK_TIME 16
#define HF_VERSION_DYNAMIC_UNLOCK 16
#define HF_VERSION_FIXED_UNLOCK 18
#define HF_VERSION_LONG_UNLOCK 20
#define HF_VERSION_BULLETPROOF_PLUS 18
#define HF_VERSION_VIEW_TAGS 20
#define HF_VERSION_2021_SCALING 20

@ -1443,7 +1443,11 @@ bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height,
}
MDEBUG("Miner tx hash: " << get_transaction_hash(b.miner_tx));
if (hf_version >= HF_VERSION_FIXED_UNLOCK)
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);
} 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="
<< b.miner_tx.unlock_time << ", expected " << height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW_V2);

@ -171,7 +171,10 @@ namespace cryptonote
tx.version = 1;
//lock
if (hard_fork_version >= HF_VERSION_FIXED_UNLOCK)
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_V2;
} else if (hard_fork_version < HF_VERSION_FIXED_UNLOCK && hard_fork_version >= HF_VERSION_DYNAMIC_UNLOCK)

Loading…
Cancel
Save