keylet::signers -> keylet::signerList

This commit is contained in:
Mayukha Vadari
2026-04-30 15:23:43 -04:00
parent 01adf22c8a
commit d7ec90cfaa
12 changed files with 19 additions and 18 deletions

View File

@@ -149,7 +149,7 @@ static ticket_t const ticket{};
/** A SignerList */
Keylet
signers(AccountID const& account) noexcept;
signerList(AccountID const& account) noexcept;
/** A Check */
/** @{ */
@@ -376,7 +376,7 @@ struct keyletDesc
std::array<keyletDesc<AccountID const&>, 6> const directAccountKeylets{
{{.function = &keylet::account, .expectedLEName = jss::AccountRoot, .includeInTests = false},
{.function = &keylet::ownerDir, .expectedLEName = jss::DirectoryNode, .includeInTests = true},
{.function = &keylet::signers, .expectedLEName = jss::SignerList, .includeInTests = true},
{.function = &keylet::signerList, .expectedLEName = jss::SignerList, .includeInTests = true},
// It's normally impossible to create an item at nftpage_min, but
// test it anyway, since the invariant checks for it.
{.function = &keylet::nftpage_min, .expectedLEName = jss::NFTokenPage, .includeInTests = true},

View File

@@ -96,7 +96,7 @@ LEDGER_ENTRY(ltNFTOKEN_PAGE, 0x0050, NFTokenPage, nft_page, ({
/** A ledger object which contains a signer list for an account.
\sa keylet::signers
\sa keylet::signerList
*/
// All fields are soeREQUIRED because there is always a SignerEntries.
// If there are no SignerEntries the node is deleted.

View File

@@ -308,15 +308,15 @@ ticket_t::operator()(AccountID const& id, SeqProxy ticketSeq) const
// else. If we ever support multiple pages of signer lists, this would be the
// keylet used to locate them.
static Keylet
signers(AccountID const& account, std::uint32_t page) noexcept
signerList(AccountID const& account, std::uint32_t page) noexcept
{
return {ltSIGNER_LIST, indexHash(LedgerNameSpace::SIGNER_LIST, account, page)};
}
Keylet
signers(AccountID const& account) noexcept
signerList(AccountID const& account) noexcept
{
return signers(account, 0);
return signerList(account, 0);
}
Keylet

View File

@@ -815,7 +815,8 @@ Transactor::checkMultiSign(
beast::Journal const j)
{
// Get id's SignerList and Quorum.
std::shared_ptr<STLedgerEntry const> const sleAccountSigners = view.read(keylet::signers(id));
std::shared_ptr<STLedgerEntry const> const sleAccountSigners =
view.read(keylet::signerList(id));
// If the signer list doesn't exist the account is not multi-signing.
if (!sleAccountSigners)
{

View File

@@ -382,7 +382,7 @@ AccountSet::doApply()
return tecNEED_MASTER_KEY;
}
if ((!sle->isFieldPresent(sfRegularKey)) && (!view().peek(keylet::signers(account_))))
if ((!sle->isFieldPresent(sfRegularKey)) && (!view().peek(keylet::signerList(account_))))
{
// Account has no regular key or multi-signer signer list.
return tecNO_ALTERNATIVE_KEY;

View File

@@ -69,7 +69,7 @@ SetRegularKey::doApply()
else
{
// Account has disabled master key and no multi-signer signer list.
if (sle->isFlag(lsfDisableMaster) && !view().peek(keylet::signers(account_)))
if (sle->isFlag(lsfDisableMaster) && !view().peek(keylet::signerList(account_)))
return tecNO_ALTERNATIVE_KEY;
sle->makeFieldAbsent(sfRegularKey);

View File

@@ -232,7 +232,7 @@ SignerListSet::removeFromLedger(
{
auto const accountKeylet = keylet::account(account);
auto const ownerDirKeylet = keylet::ownerDir(account);
auto const signerListKeylet = keylet::signers(account);
auto const signerListKeylet = keylet::signerList(account);
return removeSignersFromLedger(
registry, view, accountKeylet, ownerDirKeylet, signerListKeylet, j);
@@ -302,7 +302,7 @@ SignerListSet::replaceSignerList()
{
auto const accountKeylet = keylet::account(account_);
auto const ownerDirKeylet = keylet::ownerDir(account_);
auto const signerListKeylet = keylet::signers(account_);
auto const signerListKeylet = keylet::signerList(account_);
// This may be either a create or a replace. Preemptively remove any
// old signer list. May reduce the reserve, so this is done before
@@ -367,7 +367,7 @@ SignerListSet::destroySignerList()
return tecNO_ALTERNATIVE_KEY;
auto const ownerDirKeylet = keylet::ownerDir(account_);
auto const signerListKeylet = keylet::signers(account_);
auto const signerListKeylet = keylet::signerList(account_);
return removeSignersFromLedger(
ctx_.registry, view(), accountKeylet, ownerDirKeylet, signerListKeylet, j_);
}

View File

@@ -759,7 +759,7 @@ getSignersListAndQuorum(ReadView const& view, SLE const& sleBridge, beast::Journ
return {r, q, tecINTERNAL};
}
auto const sleS = view.read(keylet::signers(sleBridge[sfAccount]));
auto const sleS = view.read(keylet::signerList(sleBridge[sfAccount]));
if (!sleS)
{
return {r, q, tecXCHAIN_NO_SIGNERS_LIST};

View File

@@ -215,7 +215,7 @@ public:
BEAST_EXPECT(env.closed()->exists(keylet::depositPreauth(carol.id(), becky.id())));
BEAST_EXPECT(env.closed()->exists(keylet::offer(carol.id(), carolOfferSeq)));
BEAST_EXPECT(env.closed()->exists(keylet::ticket(carol.id(), carolTicketSeq)));
BEAST_EXPECT(env.closed()->exists(keylet::signers(carol.id())));
BEAST_EXPECT(env.closed()->exists(keylet::signerList(carol.id())));
// Delete carol's account even with stuff in her directory. Show
// that multisigning for the delete does not increase carol's fee.
@@ -229,7 +229,7 @@ public:
BEAST_EXPECT(!env.closed()->exists(keylet::depositPreauth(carol.id(), becky.id())));
BEAST_EXPECT(!env.closed()->exists(keylet::offer(carol.id(), carolOfferSeq)));
BEAST_EXPECT(!env.closed()->exists(keylet::ticket(carol.id(), carolTicketSeq)));
BEAST_EXPECT(!env.closed()->exists(keylet::signers(carol.id())));
BEAST_EXPECT(!env.closed()->exists(keylet::signerList(carol.id())));
// Verify that Carol's XRP, minus the fee, was transferred to becky.
BEAST_EXPECT(env.balance(becky) == carolOldBalance + beckyOldBalance - acctDelFee);

View File

@@ -1509,7 +1509,7 @@ public:
env.close();
// Verify that the SignerList object was created correctly.
auto const& sle = env.le(keylet::signers(alice.id()));
auto const& sle = env.le(keylet::signerList(alice.id()));
BEAST_EXPECT(sle);
BEAST_EXPECT(sle->getFieldArray(sfSignerEntries).size() == 2);
if (features[fixIncludeKeyletFields])

View File

@@ -90,7 +90,7 @@ isRelatedToAccount(
}
if (sle->getType() == ltSIGNER_LIST)
{
Keylet const accountSignerList = keylet::signers(accountID);
Keylet const accountSignerList = keylet::signerList(accountID);
return sle->key() == accountSignerList.key;
}
if (sle->getType() == ltNFTOKEN_OFFER)

View File

@@ -222,7 +222,7 @@ doAccountInfo(RPC::JsonContext& context)
// This code will need to be revisited if in the future we support
// multiple SignerLists on one account.
auto const sleSigners = ledger->read(keylet::signers(accountID));
auto const sleSigners = ledger->read(keylet::signerList(accountID));
if (sleSigners)
jvSignerList.append(sleSigners->getJson(JsonOptions::none));