updated Carrot hard fork for testnet; merged treasury mint into Carrot HF
This commit is contained in:
@@ -242,8 +242,7 @@
|
|||||||
#define HF_VERSION_AUDIT1_PAUSE 7
|
#define HF_VERSION_AUDIT1_PAUSE 7
|
||||||
#define HF_VERSION_AUDIT2 8
|
#define HF_VERSION_AUDIT2 8
|
||||||
#define HF_VERSION_AUDIT2_PAUSE 9
|
#define HF_VERSION_AUDIT2_PAUSE 9
|
||||||
#define HF_VERSION_TREASURY_SAL1_MINT 10
|
#define HF_VERSION_CARROT 10
|
||||||
#define HF_VERSION_CARROT 11
|
|
||||||
|
|
||||||
#define HF_VERSION_REQUIRE_VIEW_TAGS 255
|
#define HF_VERSION_REQUIRE_VIEW_TAGS 255
|
||||||
#define HF_VERSION_ENABLE_CONVERT 255
|
#define HF_VERSION_ENABLE_CONVERT 255
|
||||||
|
|||||||
@@ -1503,7 +1503,6 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
|
|||||||
case HF_VERSION_AUDIT1_PAUSE:
|
case HF_VERSION_AUDIT1_PAUSE:
|
||||||
case HF_VERSION_AUDIT2:
|
case HF_VERSION_AUDIT2:
|
||||||
case HF_VERSION_AUDIT2_PAUSE:
|
case HF_VERSION_AUDIT2_PAUSE:
|
||||||
case HF_VERSION_TREASURY_SAL1_MINT:
|
|
||||||
case HF_VERSION_CARROT:
|
case HF_VERSION_CARROT:
|
||||||
if (b.miner_tx.amount_burnt > 0) {
|
if (b.miner_tx.amount_burnt > 0) {
|
||||||
CHECK_AND_ASSERT_MES(money_in_use + b.miner_tx.amount_burnt > money_in_use, false, "miner transaction is overflowed by amount_burnt");
|
CHECK_AND_ASSERT_MES(money_in_use + b.miner_tx.amount_burnt > money_in_use, false, "miner transaction is overflowed by amount_burnt");
|
||||||
|
|||||||
@@ -343,13 +343,13 @@ namespace cryptonote
|
|||||||
const std::vector<hardfork_t>& hardforks,
|
const std::vector<hardfork_t>& hardforks,
|
||||||
const uint8_t hf_version
|
const uint8_t hf_version
|
||||||
) {
|
) {
|
||||||
if (hf_version >= HF_VERSION_TREASURY_SAL1_MINT) {
|
if (hf_version >= HF_VERSION_CARROT) {
|
||||||
// find the hardfork height
|
// find the hardfork height
|
||||||
const auto& hf = std::find_if(hardforks.begin(), hardforks.end(), [](const hardfork_t& hf) {
|
const auto& hf = std::find_if(hardforks.begin(), hardforks.end(), [](const hardfork_t& hf) {
|
||||||
return hf.version == HF_VERSION_TREASURY_SAL1_MINT;
|
return hf.version == HF_VERSION_CARROT;
|
||||||
});
|
});
|
||||||
|
|
||||||
// since we are at least at the hard fork HF_VERSION_TREASURY_SAL1_MINT, we assume height >= hf->height
|
// since we are at least at the hard fork HF_VERSION_CARROT, we assume height >= hf->height
|
||||||
const auto diff = height - hf->height;
|
const auto diff = height - hf->height;
|
||||||
const auto mint_period = get_config(nettype).TREASURY_SAL1_MINT_PERIOD;
|
const auto mint_period = get_config(nettype).TREASURY_SAL1_MINT_PERIOD;
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ namespace cryptonote
|
|||||||
case HF_VERSION_AUDIT1_PAUSE:
|
case HF_VERSION_AUDIT1_PAUSE:
|
||||||
case HF_VERSION_AUDIT2:
|
case HF_VERSION_AUDIT2:
|
||||||
case HF_VERSION_AUDIT2_PAUSE:
|
case HF_VERSION_AUDIT2_PAUSE:
|
||||||
case HF_VERSION_TREASURY_SAL1_MINT:
|
case HF_VERSION_CARROT:
|
||||||
// SRCG: subtract 20% that will be rewarded to staking users
|
// SRCG: subtract 20% that will be rewarded to staking users
|
||||||
CHECK_AND_ASSERT_MES(tx.amount_burnt == 0, false, "while creating outs: amount_burnt is nonzero");
|
CHECK_AND_ASSERT_MES(tx.amount_burnt == 0, false, "while creating outs: amount_burnt is nonzero");
|
||||||
tx.amount_burnt = amount / 5;
|
tx.amount_burnt = amount / 5;
|
||||||
|
|||||||
@@ -90,11 +90,8 @@ const hardfork_t testnet_hard_forks[] = {
|
|||||||
// version 9 (audit 1 complete, whitelist controlling payouts) starts from block 1000
|
// version 9 (audit 1 complete, whitelist controlling payouts) starts from block 1000
|
||||||
{ 9, 1000, 0, 1739280000 },
|
{ 9, 1000, 0, 1739280000 },
|
||||||
|
|
||||||
// version 10 treasury mint starts from block 1100
|
// version 10 Carrot - including treasury mint - starts from block 1100
|
||||||
{10, 1100, 0, 1739780005 },
|
{10, 1100, 0, 1739780005 },
|
||||||
|
|
||||||
// version 11 carrot starts from block 1500
|
|
||||||
{11, 1500, 0, 1739780010 },
|
|
||||||
};
|
};
|
||||||
const size_t num_testnet_hard_forks = sizeof(testnet_hard_forks) / sizeof(testnet_hard_forks[0]);
|
const size_t num_testnet_hard_forks = sizeof(testnet_hard_forks) / sizeof(testnet_hard_forks[0]);
|
||||||
const uint64_t testnet_hard_fork_version_1_till = ((uint64_t)-1);
|
const uint64_t testnet_hard_fork_version_1_till = ((uint64_t)-1);
|
||||||
|
|||||||
Reference in New Issue
Block a user