diff --git a/include/xrpl/protocol/Indexes.h b/include/xrpl/protocol/Indexes.h index 681faab7a3..7080cbd300 100644 --- a/include/xrpl/protocol/Indexes.h +++ b/include/xrpl/protocol/Indexes.h @@ -68,7 +68,7 @@ skip(LedgerIndex ledger) noexcept; /** The (fixed) index of the object containing the ledger fees. */ Keylet const& -fees() noexcept; +feeSettings() noexcept; /** The (fixed) index of the object containing the ledger negativeUNL. */ Keylet const& diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index 20289a42aa..9566dd5d31 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -292,7 +292,7 @@ LEDGER_ENTRY(ltRIPPLE_STATE, 0x0072, RippleState, state, ({ \note This is a singleton: only one such object exists in the ledger. - \sa keylet::fees + \sa keylet::feeSettings */ LEDGER_ENTRY(ltFEE_SETTINGS, 0x0073, FeeSettings, fee, ({ // Old version uses raw numbers diff --git a/src/libxrpl/ledger/Ledger.cpp b/src/libxrpl/ledger/Ledger.cpp index 729f1ebce9..65ecdd4915 100644 --- a/src/libxrpl/ledger/Ledger.cpp +++ b/src/libxrpl/ledger/Ledger.cpp @@ -183,7 +183,7 @@ Ledger::Ledger( } { - auto sle = std::make_shared(keylet::fees()); + auto sle = std::make_shared(keylet::feeSettings()); // Whether featureXRPFees is supported will depend on startup options. if (std::ranges::find(amendments, featureXRPFees) != amendments.end()) { @@ -580,7 +580,7 @@ Ledger::setup() try { - if (auto const sle = read(keylet::fees())) + if (auto const sle = read(keylet::feeSettings())) { bool oldFees = false; bool newFees = false; diff --git a/src/libxrpl/protocol/Indexes.cpp b/src/libxrpl/protocol/Indexes.cpp index 093fd4cd18..43f0df3ad6 100644 --- a/src/libxrpl/protocol/Indexes.cpp +++ b/src/libxrpl/protocol/Indexes.cpp @@ -219,7 +219,7 @@ amendments() noexcept } Keylet const& -fees() noexcept +feeSettings() noexcept { static Keylet const ret{ltFEE_SETTINGS, indexHash(LedgerNameSpace::FEE_SETTINGS)}; return ret; diff --git a/src/libxrpl/tx/transactors/system/Change.cpp b/src/libxrpl/tx/transactors/system/Change.cpp index 60dbb06a17..ebfa050875 100644 --- a/src/libxrpl/tx/transactors/system/Change.cpp +++ b/src/libxrpl/tx/transactors/system/Change.cpp @@ -256,7 +256,7 @@ Change::applyAmendment() TER Change::applyFee() { - auto const k = keylet::fees(); + auto const k = keylet::feeSettings(); SLE::pointer feeObject = view().peek(k); diff --git a/src/test/app/FeeVote_test.cpp b/src/test/app/FeeVote_test.cpp index e24b54c82a..347ddc5009 100644 --- a/src/test/app/FeeVote_test.cpp +++ b/src/test/app/FeeVote_test.cpp @@ -144,7 +144,7 @@ verifyFeeObject( Rules const& rules, FeeSettingsFields const& expected) { - auto const feeObject = ledger->read(keylet::fees()); + auto const feeObject = ledger->read(keylet::feeSettings()); if (!feeObject) return false; diff --git a/src/test/app/RCLValidations_test.cpp b/src/test/app/RCLValidations_test.cpp index 14b9979e07..b7b2bd5605 100644 --- a/src/test/app/RCLValidations_test.cpp +++ b/src/test/app/RCLValidations_test.cpp @@ -97,7 +97,7 @@ class RCLValidations_test : public beast::unit_test::suite auto next = std::make_shared(*prev, env.app().getTimeKeeper().closeTime()); // Force a different hash on the first iteration next->updateSkipList(); - BEAST_EXPECT(next->read(keylet::fees())); + BEAST_EXPECT(next->read(keylet::feeSettings())); if (forceHash) { next->setImmutable(); diff --git a/src/test/rpc/LedgerEntry_test.cpp b/src/test/rpc/LedgerEntry_test.cpp index d6e1ccc2ce..48a766117b 100644 --- a/src/test/rpc/LedgerEntry_test.cpp +++ b/src/test/rpc/LedgerEntry_test.cpp @@ -1477,7 +1477,7 @@ class LedgerEntry_test : public beast::unit_test::suite // positive test { - Keylet const keylet = keylet::fees(); + Keylet const keylet = keylet::feeSettings(); Json::Value jvParams; jvParams[jss::fee] = to_string(keylet.key); Json::Value const jrr = @@ -2420,7 +2420,7 @@ class LedgerEntry_test : public beast::unit_test::suite }; test(jss::amendments, jss::Amendments, keylet::amendments(), true); - test(jss::fee, jss::FeeSettings, keylet::fees(), true); + test(jss::fee, jss::FeeSettings, keylet::feeSettings(), true); // There won't be an nunl test(jss::nunl, jss::NegativeUNL, keylet::negativeUNL(), false); // Can only get the short skip list this way diff --git a/src/xrpld/app/ledger/detail/BuildLedger.cpp b/src/xrpld/app/ledger/detail/BuildLedger.cpp index c75b1e0a12..1731653a49 100644 --- a/src/xrpld/app/ledger/detail/BuildLedger.cpp +++ b/src/xrpld/app/ledger/detail/BuildLedger.cpp @@ -71,7 +71,7 @@ buildLedgerImpl( // Accept ledger XRPL_ASSERT( - built->header().seq < XRP_LEDGER_EARLIEST_FEES || built->read(keylet::fees()), + built->header().seq < XRP_LEDGER_EARLIEST_FEES || built->read(keylet::feeSettings()), "xrpl::buildLedgerImpl : valid ledger fees"); built->setAccepted(closeTime, closeResolution, closeTimeCorrect); diff --git a/src/xrpld/app/ledger/detail/InboundLedger.cpp b/src/xrpld/app/ledger/detail/InboundLedger.cpp index 52636d08c6..e2c1955e62 100644 --- a/src/xrpld/app/ledger/detail/InboundLedger.cpp +++ b/src/xrpld/app/ledger/detail/InboundLedger.cpp @@ -129,7 +129,7 @@ InboundLedger::init(ScopedLockType& collectionLock) JLOG(journal_.debug()) << "Acquiring ledger we already have in " << " local store. " << hash_; XRPL_ASSERT( - mLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::fees()), + mLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::feeSettings()), "xrpl::InboundLedger::init : valid ledger fees"); mLedger->setImmutable(); @@ -352,7 +352,8 @@ InboundLedger::tryDB(NodeStore::Database& srcDB) JLOG(journal_.debug()) << "Had everything locally"; complete_ = true; XRPL_ASSERT( - mLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::fees()), + mLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || + mLedger->read(keylet::feeSettings()), "xrpl::InboundLedger::tryDB : valid ledger fees"); mLedger->setImmutable(); } @@ -448,7 +449,8 @@ InboundLedger::done() if (complete_ && !failed_ && mLedger) { XRPL_ASSERT( - mLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || mLedger->read(keylet::fees()), + mLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || + mLedger->read(keylet::feeSettings()), "xrpl::InboundLedger::done : valid ledger fees"); mLedger->setImmutable(); switch (mReason) diff --git a/src/xrpld/app/ledger/detail/LedgerPersistence.cpp b/src/xrpld/app/ledger/detail/LedgerPersistence.cpp index 0edf425f13..7a0d507d07 100644 --- a/src/xrpld/app/ledger/detail/LedgerPersistence.cpp +++ b/src/xrpld/app/ledger/detail/LedgerPersistence.cpp @@ -120,7 +120,7 @@ finishLoadByIndexOrHash(std::shared_ptr const& ledger, beast::Journal j) return; XRPL_ASSERT( - ledger->header().seq < XRP_LEDGER_EARLIEST_FEES || ledger->read(keylet::fees()), + ledger->header().seq < XRP_LEDGER_EARLIEST_FEES || ledger->read(keylet::feeSettings()), "xrpl::finishLoadByIndexOrHash : valid ledger fees"); ledger->setImmutable(); diff --git a/src/xrpld/app/main/Application.cpp b/src/xrpld/app/main/Application.cpp index d43f842eed..d15102b7d2 100644 --- a/src/xrpld/app/main/Application.cpp +++ b/src/xrpld/app/main/Application.cpp @@ -1715,7 +1715,7 @@ ApplicationImp::startGenesisLedger() auto const next = std::make_shared(*genesis, getTimeKeeper().closeTime()); next->updateSkipList(); XRPL_ASSERT( - next->header().seq < XRP_LEDGER_EARLIEST_FEES || next->read(keylet::fees()), + next->header().seq < XRP_LEDGER_EARLIEST_FEES || next->read(keylet::feeSettings()), "xrpl::ApplicationImp::startGenesisLedger : valid ledger fees"); next->setImmutable(); openLedger_.emplace(next, cachedSLEs_, logs_->journal("OpenLedger")); @@ -1737,7 +1737,7 @@ ApplicationImp::getLastFullLedger() return ledger; XRPL_ASSERT( - ledger->header().seq < XRP_LEDGER_EARLIEST_FEES || ledger->read(keylet::fees()), + ledger->header().seq < XRP_LEDGER_EARLIEST_FEES || ledger->read(keylet::feeSettings()), "xrpl::ApplicationImp::getLastFullLedger : valid ledger fees"); ledger->setImmutable(); @@ -1888,7 +1888,8 @@ ApplicationImp::loadLedgerFromFile(std::string const& name) loadLedger->stateMap().flushDirty(NodeObjectType::hotACCOUNT_NODE); XRPL_ASSERT( - loadLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || loadLedger->read(keylet::fees()), + loadLedger->header().seq < XRP_LEDGER_EARLIEST_FEES || + loadLedger->read(keylet::feeSettings()), "xrpl::ApplicationImp::loadLedgerFromFile : valid ledger fees"); loadLedger->setAccepted(closeTime, closeTimeResolution, !closeTimeEstimated); diff --git a/src/xrpld/rpc/handlers/ledger/LedgerEntry.cpp b/src/xrpld/rpc/handlers/ledger/LedgerEntry.cpp index 4d69f0791a..36dea61553 100644 --- a/src/xrpld/rpc/handlers/ledger/LedgerEntry.cpp +++ b/src/xrpld/rpc/handlers/ledger/LedgerEntry.cpp @@ -82,7 +82,7 @@ parseIndex(Json::Value const& params, Json::StaticString const fieldName, unsign if (index == jss::amendments.c_str()) return keylet::amendments().key; if (index == jss::fee.c_str()) - return keylet::fees().key; + return keylet::feeSettings().key; if (index == jss::nunl) return keylet::negativeUNL().key; if (index == jss::hashes) @@ -434,7 +434,7 @@ parseEscrow( return keylet::escrow(*id, *seq).key; } -auto const parseFeeSettings = fixed(keylet::fees()); +auto const parseFeeSettings = fixed(keylet::feeSettings()); static Expected parseFixed(