From 1dc05ad8e478c0ab6c87bf45e1c0c765bc724f88 Mon Sep 17 00:00:00 2001 From: Peter John Bushnell Date: Wed, 31 Aug 2022 09:26:16 +0100 Subject: [PATCH] Rename GreatWork to FortCanningGreatWorld (#1435) --- .gitignore | 5 +++++ src/chainparams.cpp | 11 +++++----- src/consensus/params.h | 2 +- src/init.cpp | 2 +- src/masternodes/govvariables/attributes.cpp | 4 ++-- src/masternodes/loan.cpp | 12 +++++----- src/masternodes/mn_checks.cpp | 22 ++++++------------- src/masternodes/rpc_loan.cpp | 2 +- src/masternodes/rpc_vault.cpp | 2 +- src/rpc/blockchain.cpp | 2 +- src/test/loan_tests.cpp | 2 +- src/validation.cpp | 6 ++--- test/functional/feature_negative_interest.py | 2 +- .../feature_negative_loan_interest.py | 2 +- test/functional/feature_stored_interest.py | 2 +- test/functional/rpc_blockchain.py | 2 +- test/functional/rpc_getstoredinterest.py | 12 +++++----- 17 files changed, 44 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index a77db6d536..2269cba124 100644 --- a/.gitignore +++ b/.gitignore @@ -145,3 +145,8 @@ dist/ # compile_commands.json compile_commands.json + +# secp256k1 +src/secp256k1/gen_context +src/secp256k1/src/ecmult_static_context.h + diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 5843cc85f4..6e70b6e4e8 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -136,8 +136,7 @@ class CMainParams : public CChainParams { consensus.FortCanningRoadHeight = 1786000; // April 11, 2022. consensus.FortCanningCrunchHeight = 1936000; // June 2, 2022. consensus.FortCanningSpringHeight = 2033000; // July 6, 2022. - // TODO: Rename later to FortCanningGreatWorld - consensus.GreatWorldHeight = 2212000; // Sep 7th, 2022. + consensus.FortCanningGreatWorldHeight = 2212000; // Sep 7th, 2022. consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -375,7 +374,7 @@ class CTestNetParams : public CChainParams { consensus.FortCanningRoadHeight = 893700; consensus.FortCanningCrunchHeight = 1011600; consensus.FortCanningSpringHeight = 1086000; - consensus.GreatWorldHeight = std::numeric_limits::max(); + consensus.FortCanningGreatWorldHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -568,7 +567,7 @@ class CDevNetParams : public CChainParams { consensus.FortCanningRoadHeight = std::numeric_limits::max(); consensus.FortCanningCrunchHeight = std::numeric_limits::max(); consensus.FortCanningSpringHeight = std::numeric_limits::max(); - consensus.GreatWorldHeight = std::numeric_limits::max(); + consensus.FortCanningGreatWorldHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.pos.nTargetTimespan = 5 * 60; // 5 min == 10 blocks @@ -753,7 +752,7 @@ class CRegTestParams : public CChainParams { consensus.FortCanningRoadHeight = 10000000; consensus.FortCanningCrunchHeight = 10000000; consensus.FortCanningSpringHeight = 10000000; - consensus.GreatWorldHeight = 10000000; + consensus.FortCanningGreatWorldHeight = 10000000; consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -976,7 +975,7 @@ void SetupCommonArgActivationParams(Consensus::Params &consensus) { UpdateHeightValidation("Fort Canning Road", "-fortcanningroadheight", consensus.FortCanningRoadHeight); UpdateHeightValidation("Fort Canning Crunch", "-fortcanningcrunchheight", consensus.FortCanningCrunchHeight); UpdateHeightValidation("Fort Canning Spring", "-fortcanningspringheight", consensus.FortCanningSpringHeight); - UpdateHeightValidation("Great World", "-greatworldheight", consensus.GreatWorldHeight); + UpdateHeightValidation("Fort Canning Great World", "-fortcanninggreatworldheight", consensus.FortCanningGreatWorldHeight); if (gArgs.GetBoolArg("-simulatemainnet", false)) { consensus.pos.nTargetTimespan = 5 * 60; // 5 min == 10 blocks diff --git a/src/consensus/params.h b/src/consensus/params.h index f09891c38c..946eb9ac62 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -97,7 +97,7 @@ struct Params { int FortCanningRoadHeight; int FortCanningCrunchHeight; int FortCanningSpringHeight; - int GreatWorldHeight; + int FortCanningGreatWorldHeight; /** Foundation share after AMK, normalized to COIN = 100% */ CAmount foundationShareDFIP1; diff --git a/src/init.cpp b/src/init.cpp index 2b23e46b2f..3f3408aa2a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -501,7 +501,7 @@ void SetupServerArgs() gArgs.AddArg("-fortcanningroadheight", "Fort Canning Road fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanningcrunchheight", "Fort Canning Crunch fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanningspringheight", "Fort Canning Spring fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); - gArgs.AddArg("-greatworldheight", "Great World fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); + gArgs.AddArg("-fortcanninggreatworldheight", "Fort Canning Great World fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-jellyfish_regtest", "Configure the regtest network for jellyfish testing", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS); gArgs.AddArg("-simulatemainnet", "Configure the regtest network to mainnet target timespan and spacing ", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS); gArgs.AddArg("-dexstats", strprintf("Enable storing live dex data in DB (default: %u)", DEFAULT_DEXSTATS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); diff --git a/src/masternodes/govvariables/attributes.cpp b/src/masternodes/govvariables/attributes.cpp index ddf9e6a853..1f17f56cd9 100644 --- a/src/masternodes/govvariables/attributes.cpp +++ b/src/masternodes/govvariables/attributes.cpp @@ -918,7 +918,7 @@ Res ATTRIBUTES::Validate(const CCustomCSView & view) const } break; case TokenKeys::LoanMintingInterest: - if (view.GetLastHeight() < Params().GetConsensus().GreatWorldHeight) { + if (view.GetLastHeight() < Params().GetConsensus().FortCanningGreatWorldHeight) { const auto amount = std::get_if(&value); if (amount && *amount < 0) { return Res::Err("Amount must be a positive value"); @@ -1153,7 +1153,7 @@ Res ATTRIBUTES::Apply(CCustomCSView & mnview, const uint32_t height) return res; } } else if (attrV0->key == TokenKeys::LoanMintingInterest) { - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight) && interestTokens.count(attrV0->typeId)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight) && interestTokens.count(attrV0->typeId)) { const auto tokenInterest = std::get_if(&attribute.second); if (!tokenInterest) { return Res::Err("Unexpected type"); diff --git a/src/masternodes/loan.cpp b/src/masternodes/loan.cpp index b76e07213c..1737be7c1f 100644 --- a/src/masternodes/loan.cpp +++ b/src/masternodes/loan.cpp @@ -188,7 +188,7 @@ void CLoanView::EraseDelayedDestroyScheme(const std::string& loanSchemeID) std::optional CLoanView::GetInterestRate(const CVaultId& vaultId, const DCT_ID id, const uint32_t height) { - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight)) { return ReadBy(std::make_pair(vaultId, id)); } @@ -292,7 +292,7 @@ CAmount TotalInterest(const CInterestRateV3& rate, const uint32_t height) void CLoanView::WriteInterestRate(const std::pair& pair, const CInterestRateV3& rate, uint32_t height) { - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight)) { WriteBy(pair, rate); } else if (height >= static_cast(Params().GetConsensus().FortCanningHillHeight)) { WriteBy(pair, ConvertInterestRateToV2(rate)); @@ -321,7 +321,7 @@ Res CLoanView::IncreaseInterest(const uint32_t height, const CVaultId& vaultId, rate.interestToHeight = TotalInterestCalculation(rate, height); rate.height = height; - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight)) { CBalances amounts; ReadBy(vaultId, amounts); @@ -373,7 +373,7 @@ Res CLoanView::DecreaseInterest(const uint32_t height, const CVaultId& vaultId, rate.height = height; - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight)) { CBalances amounts; ReadBy(vaultId, amounts); rate.interestPerBlock = InterestPerBlockCalculationV3(amounts.balances[id], token->interest, scheme->rate); @@ -452,7 +452,7 @@ void EraseInterest(CLoanView& view, const CVaultId& vaultId) Res CLoanView::EraseInterest(const CVaultId& vaultId, uint32_t height) { - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight)) { ::EraseInterest(*this, vaultId); } else if (height >= static_cast(Params().GetConsensus().FortCanningHillHeight)) { ::EraseInterest(*this, vaultId); @@ -465,7 +465,7 @@ Res CLoanView::EraseInterest(const CVaultId& vaultId, uint32_t height) void CLoanView::EraseInterest(const CVaultId& vaultId, DCT_ID id, uint32_t height) { - if (height >= static_cast(Params().GetConsensus().GreatWorldHeight)) { + if (height >= static_cast(Params().GetConsensus().FortCanningGreatWorldHeight)) { EraseBy(std::make_pair(vaultId, id)); } else if (height >= static_cast(Params().GetConsensus().FortCanningHillHeight)) { EraseBy(std::make_pair(vaultId, id)); diff --git a/src/masternodes/mn_checks.cpp b/src/masternodes/mn_checks.cpp index 4699d97984..39c52fbbc7 100644 --- a/src/masternodes/mn_checks.cpp +++ b/src/masternodes/mn_checks.cpp @@ -251,13 +251,6 @@ class CCustomMetadataParseVisitor return Res::Ok(); } - Res isPostGreatWorldFork() const { - if(static_cast(height) < consensus.GreatWorldHeight) { - return Res::Err("called before GreatWorldHeight height"); - } - return Res::Ok(); - } - template Res serialize(T& obj) const { CDataStream ss(metadata, SER_NETWORK, PROTOCOL_VERSION); @@ -2478,7 +2471,7 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor if (!HasFoundationAuth()) return Res::Err("tx not from foundation member!"); - if (obj.interest < 0 && height < static_cast(consensus.GreatWorldHeight)) { + if (obj.interest < 0 && height < static_cast(consensus.FortCanningGreatWorldHeight)) { return Res::Err("interest rate cannot be less than 0!"); } @@ -2567,7 +2560,7 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor if (!HasFoundationAuth()) return Res::Err("tx not from foundation member!"); - if (obj.interest < 0 && height < static_cast(consensus.GreatWorldHeight)) { + if (obj.interest < 0 && height < static_cast(consensus.FortCanningGreatWorldHeight)) { return Res::Err("interest rate cannot be less than 0!"); } @@ -2931,9 +2924,8 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor return Res::Err("Vault does not have enough collateralization ratio defined by loan scheme - %d < %d", collateralsLoans.val->ratio(), scheme->ratio); } } - if (height >= static_cast(consensus.GreatWorldHeight)) { - const auto loanTokens = mnview.GetLoanTokens(obj.vaultId); - if (loanTokens) { + if (height >= static_cast(consensus.FortCanningGreatWorldHeight)) { + if (const auto loanTokens = mnview.GetLoanTokens(obj.vaultId)) { for (const auto& [tokenId, tokenAmount] : loanTokens->balances) { const auto loanToken = mnview.GetLoanTokenByID(tokenId); assert(loanToken); @@ -3119,7 +3111,7 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor uint64_t totalLoansActivePrice = 0, totalLoansNextPrice = 0; for (const auto& [tokenId, tokenAmount] : obj.amounts.balances) { - if (height >= static_cast(consensus.GreatWorldHeight) && tokenAmount <= 0) + if (height >= static_cast(consensus.FortCanningGreatWorldHeight) && tokenAmount <= 0) return Res::Err("Valid loan amount required (input: %d@%d)", tokenAmount, tokenId.v); auto loanToken = mnview.GetLoanTokenByID(tokenId); @@ -3306,7 +3298,7 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor const auto& paybackTokenId = kv.first; auto paybackAmount = kv.second; - if (height >= static_cast(consensus.GreatWorldHeight) && paybackAmount <= 0) { + if (height >= static_cast(consensus.FortCanningGreatWorldHeight) && paybackAmount <= 0) { return Res::Err("Valid payback amount required (input: %d@%d)", paybackAmount, paybackTokenId.v); } @@ -3420,7 +3412,7 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor if (height >= static_cast(consensus.FortCanningMuseumHeight) && subLoan < currentLoanAmount && - height < static_cast(consensus.GreatWorldHeight)) + height < static_cast(consensus.FortCanningGreatWorldHeight)) { auto newRate = mnview.GetInterestRate(obj.vaultId, loanTokenId, height); if (!newRate) diff --git a/src/masternodes/rpc_loan.cpp b/src/masternodes/rpc_loan.cpp index 472d71eeae..b8e0f97b90 100644 --- a/src/masternodes/rpc_loan.cpp +++ b/src/masternodes/rpc_loan.cpp @@ -1516,7 +1516,7 @@ UniValue getinterest(const JSONRPCRequest& request) { return true; }; - if (height >= Params().GetConsensus().GreatWorldHeight) { + if (height >= Params().GetConsensus().FortCanningGreatWorldHeight) { pcustomcsview->ForEachVaultInterestV3(vaultInterest); } else if (height >= Params().GetConsensus().FortCanningHillHeight) { pcustomcsview->ForEachVaultInterestV2([&](const CVaultId& vaultId, DCT_ID tokenId, const CInterestRateV2 &rate) { diff --git a/src/masternodes/rpc_vault.cpp b/src/masternodes/rpc_vault.cpp index 46b2d9c5bb..337917b4d8 100644 --- a/src/masternodes/rpc_vault.cpp +++ b/src/masternodes/rpc_vault.cpp @@ -178,7 +178,7 @@ namespace { totalInterests += interestCalculation; } if (verbose) { - if (height >= Params().GetConsensus().GreatWorldHeight) { + if (height >= Params().GetConsensus().FortCanningGreatWorldHeight) { interestsPerBlockValueHighPrecision = InterestAddition(interestsPerBlockValueHighPrecision, {rate->interestPerBlock.negative, static_cast>(price) * rate->interestPerBlock.amount / COIN}); interestsPerBlockHighPrecission[tokenId] = rate->interestPerBlock; } else if (height >= Params().GetConsensus().FortCanningHillHeight) { diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index e15b46e3da..2a2c572f3f 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1334,7 +1334,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request) BuriedForkDescPushBack(softforks, "fortcanningroad", consensusParams.FortCanningRoadHeight); BuriedForkDescPushBack(softforks, "fortcanningcrunch", consensusParams.FortCanningCrunchHeight); BuriedForkDescPushBack(softforks, "fortcanningspring", consensusParams.FortCanningSpringHeight); - BuriedForkDescPushBack(softforks, "greatworld", consensusParams.GreatWorldHeight); + BuriedForkDescPushBack(softforks, "fortcanninggreatworld", consensusParams.FortCanningGreatWorldHeight); BIP9SoftForkDescPushBack(softforks, "testdummy", consensusParams, Consensus::DEPLOYMENT_TESTDUMMY); obj.pushKV("softforks", softforks); diff --git a/src/test/loan_tests.cpp b/src/test/loan_tests.cpp index 3190a3f7dc..518f4825ee 100644 --- a/src/test/loan_tests.cpp +++ b/src/test/loan_tests.cpp @@ -314,7 +314,7 @@ BOOST_AUTO_TEST_CASE(loan_interest_rate) BOOST_AUTO_TEST_CASE(loan_total_interest_calculation) { // Activate negative interest rate - const_cast(Params().GetConsensus().GreatWorldHeight) = 1; + const_cast(Params().GetConsensus().FortCanningGreatWorldHeight) = 1; CCustomCSView mnview(*pcustomcsview); diff --git a/src/validation.cpp b/src/validation.cpp index 2ecdc6a2c9..69fc74bf9d 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1845,7 +1845,7 @@ DisconnectResult CChainState::DisconnectBlock(const CBlock& block, const CBlockI } // one time downgrade to revert CInterestRateV3 structure - if (pindex->nHeight == Params().GetConsensus().GreatWorldHeight) { + if (pindex->nHeight == Params().GetConsensus().FortCanningGreatWorldHeight) { auto time = GetTimeMillis(); LogPrintf("Interest rate reverting ...\n"); mnview.RevertInterestRateToV2(); @@ -2572,7 +2572,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl LogPrint(BCLog::BENCH, " - Interest rate migration took: %dms\n", GetTimeMillis() - time); } - if (pindex->nHeight == chainparams.GetConsensus().GreatWorldHeight) { + if (pindex->nHeight == chainparams.GetConsensus().FortCanningGreatWorldHeight) { auto time = GetTimeMillis(); LogPrintf("Interest rate migration ...\n"); mnview.MigrateInterestRateToV3(mnview, static_cast(pindex->nHeight)); @@ -4412,7 +4412,7 @@ static Res VaultSplits(CCustomCSView& view, ATTRIBUTES& attributes, const DCT_ID CVaultId failedVault; std::vector> loanInterestRates; - if (height >= Params().GetConsensus().GreatWorldHeight) { + if (height >= Params().GetConsensus().FortCanningGreatWorldHeight) { view.ForEachVaultInterestV3([&](const CVaultId& vaultId, DCT_ID tokenId, const CInterestRateV3& rate) { if (tokenId == oldTokenId) { const auto vaultData = view.GetVault(vaultId); diff --git a/test/functional/feature_negative_interest.py b/test/functional/feature_negative_interest.py index 06e0b1b364..032465d47c 100755 --- a/test/functional/feature_negative_interest.py +++ b/test/functional/feature_negative_interest.py @@ -28,7 +28,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True self.extra_args = [ - ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanningspringheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-greatworldheight=1', '-jellyfish_regtest=1', '-txindex=1', '-simulatemainnet=1'] + ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanningspringheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-jellyfish_regtest=1', '-txindex=1', '-simulatemainnet=1'] ] def createTokens(self): diff --git a/test/functional/feature_negative_loan_interest.py b/test/functional/feature_negative_loan_interest.py index d0cc4c1342..89cbdeb8a1 100755 --- a/test/functional/feature_negative_loan_interest.py +++ b/test/functional/feature_negative_loan_interest.py @@ -15,7 +15,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True self.extra_args = [ - ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-greatworldheight=1', '-jellyfish_regtest=1']] + ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-jellyfish_regtest=1']] def run_test(self): # Create tokens for tests diff --git a/test/functional/feature_stored_interest.py b/test/functional/feature_stored_interest.py index 5a3d7a9154..c77bef2982 100755 --- a/test/functional/feature_stored_interest.py +++ b/test/functional/feature_stored_interest.py @@ -16,7 +16,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True self.extra_args = [ - ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-greatworldheight=1', '-jellyfish_regtest=1']] + ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningcrunchheight=1', '-fortcanninggreatworldheight=1', '-jellyfish_regtest=1']] def run_test(self): # Create tokens for tests diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 1bcc3d9f87..6ae5a15bca 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -138,7 +138,7 @@ def _test_getblockchaininfo(self): 'fortcanningroad': {'type': 'buried', 'active': False, 'height': 10000000}, 'fortcanningcrunch': {'type': 'buried', 'active': False, 'height': 10000000}, 'fortcanningspring': {'type': 'buried', 'active': False, 'height': 10000000}, - 'greatworld': {'type': 'buried', 'active': False, 'height': 10000000}, + 'fortcanninggreatworld': {'type': 'buried', 'active': False, 'height': 10000000}, 'testdummy': { 'type': 'bip9', 'bip9': { diff --git a/test/functional/rpc_getstoredinterest.py b/test/functional/rpc_getstoredinterest.py index 52f15de158..a42fe61aff 100755 --- a/test/functional/rpc_getstoredinterest.py +++ b/test/functional/rpc_getstoredinterest.py @@ -26,11 +26,11 @@ class GetStoredInterestTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True - self.greatworldheight = 700 + self.fortcanninggreatworldheight = 700 self.extra_args = [ ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanningspringheight=1', '-fortcanninghillheight=1', - '-fortcanningcrunchheight=1', f'-greatworldheight={self.greatworldheight}', '-jellyfish_regtest=1', + '-fortcanningcrunchheight=1', f'-fortcanninggreatworldheight={self.fortcanninggreatworldheight}', '-jellyfish_regtest=1', '-txindex=1', '-simulatemainnet=1'] ] @@ -55,15 +55,15 @@ def new_vault(self, loan_scheme, deposit=10): def goto_gw_height(self): blockHeight = self.nodes[0].getblockcount() - if self.greatworldheight > blockHeight: - self.nodes[0].generate((self.greatworldheight - blockHeight) + 2) + if self.fortcanninggreatworldheight > blockHeight: + self.nodes[0].generate((self.fortcanninggreatworldheight - blockHeight) + 2) blockchainInfo = self.nodes[0].getblockchaininfo() - assert_equal(blockchainInfo["softforks"]["greatworld"]["active"], True) + assert_equal(blockchainInfo["softforks"]["fortcanninggreatworld"]["active"], True) def goto_setup_height(self): self.rollback_to(self.setup_height) blockchainInfo = self.nodes[0].getblockchaininfo() - assert_equal(blockchainInfo["softforks"]["greatworld"]["active"], False) + assert_equal(blockchainInfo["softforks"]["fortcanninggreatworld"]["active"], False) # Default token = 1 = dUSD def set_token_interest(self, token='1', interest=0):