From 704e36c634ea0ed1061e6a8b2b54e88e805da37d Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 14:29:38 +0000 Subject: [PATCH] disable SPORK_116_TOT_SPLY_TRGT_EMISSION and SPORK_117_CIRC_SPLY_TRGT_EMISSION sporks, the dynamic rewards value will be determined by constant values --- src/rewards.cpp | 4 ++-- src/rewards.h | 3 +++ src/spork.cpp | 4 ++-- src/sporkid.h | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/rewards.cpp b/src/rewards.cpp index 5bc227de3..4b23699bb 100644 --- a/src/rewards.cpp +++ b/src/rewards.cpp @@ -286,9 +286,9 @@ bool CRewards::ConnectBlock(CBlockIndex* pindex, CAmount nSubsidy, CCoinsViewCac oss << "nCirculatingSupply without staked coins: " << FormatMoney(nCirculatingSupply) << std::endl; // calculate target emissions - const auto nTotalEmissionRate = sporkManager.GetSporkValue(SPORK_116_TOT_SPLY_TRGT_EMISSION); + const auto nTotalEmissionRate = TOT_SPLY_TRGT_EMISSION; oss << "nTotalEmissionRate: " << nTotalEmissionRate << std::endl; - const auto nCirculatingEmissionRate = sporkManager.GetSporkValue(SPORK_117_CIRC_SPLY_TRGT_EMISSION); + const auto nCirculatingEmissionRate = CIRC_SPLY_TRGT_EMISSION; oss << "nCirculatingEmissionRate: " << nCirculatingEmissionRate << std::endl; const auto nActualEmission = nSubsidy * nRewardAdjustmentInterval; oss << "nActualEmission: " << FormatMoney(nActualEmission) << std::endl; diff --git a/src/rewards.h b/src/rewards.h index 6a9234c5b..2f67cb3ba 100644 --- a/src/rewards.h +++ b/src/rewards.h @@ -9,6 +9,9 @@ #include "main.h" +static const int64_t TOT_SPLY_TRGT_EMISSION = 50000; +static const int64_t CIRC_SPLY_TRGT_EMISSION = 100000; + class CBlockchainStatus { public: diff --git a/src/spork.cpp b/src/spork.cpp index c6d11226f..b0bcc31a0 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -32,8 +32,6 @@ std::vector sporkDefs = { MAKE_SPORK_DEF(SPORK_112_MASTERNODE_LAST_PAID_V2, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_114_MN_PAYMENT_V2, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_115_MN_COLLATERAL_WINDOW, 4070908800ULL), // OFF - MAKE_SPORK_DEF(SPORK_116_TOT_SPLY_TRGT_EMISSION, 50000ULL), // 5% - MAKE_SPORK_DEF(SPORK_117_CIRC_SPLY_TRGT_EMISSION, 100000ULL), // 10% MAKE_SPORK_DEF(SPORK_118_MIN_BASE_FEE, 0ULL), // OFF MAKE_SPORK_DEF(SPORK_119_MIN_ECON_FEE, 0ULL), // OFF @@ -52,6 +50,8 @@ std::vector sporkDefs = { MAKE_SPORK_DEF(SPORK_18_NOOP, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_19_NOOP, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_113_NOOP, 4070908800ULL), // OFF + MAKE_SPORK_DEF(SPORK_116_NOOP, 4070908800ULL), // OFF + MAKE_SPORK_DEF(SPORK_117_NOOP, 4070908800ULL), // OFF }; CSporkManager sporkManager; diff --git a/src/sporkid.h b/src/sporkid.h index 46195a427..aac59d608 100644 --- a/src/sporkid.h +++ b/src/sporkid.h @@ -30,8 +30,6 @@ enum SporkId : int32_t { SPORK_112_MASTERNODE_LAST_PAID_V2 = 10111, SPORK_114_MN_PAYMENT_V2 = 10113, SPORK_115_MN_COLLATERAL_WINDOW = 10114, - SPORK_116_TOT_SPLY_TRGT_EMISSION = 10115, - SPORK_117_CIRC_SPLY_TRGT_EMISSION = 10116, SPORK_118_MIN_BASE_FEE = 10117, SPORK_119_MIN_ECON_FEE = 10118, @@ -50,6 +48,8 @@ enum SporkId : int32_t { SPORK_18_NOOP = 10017, SPORK_19_NOOP = 10018, SPORK_113_NOOP = 10112, + SPORK_116_NOOP = 10115, + SPORK_117_NOOP = 10116, SPORK_INVALID = -1 };