-
Notifications
You must be signed in to change notification settings - Fork 1.6k
refactor: Rename (mostly keylet) functions to more closely match the docs #7059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
b978001
01adf22
d7ec90c
f6c2210
93d0276
e7b63f0
3af0b6b
1e41d0d
68bfec1
83bdf86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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& | ||
|
|
@@ -93,12 +93,12 @@ static book_t const book{}; | |
| */ | ||
| /** @{ */ | ||
| Keylet | ||
| line(AccountID const& id0, AccountID const& id1, Currency const& currency) noexcept; | ||
| rippleState(AccountID const& id0, AccountID const& id1, Currency const& currency) noexcept; | ||
|
|
||
| inline Keylet | ||
| line(AccountID const& id, Issue const& issue) noexcept | ||
| rippleState(AccountID const& id, Issue const& issue) noexcept | ||
| { | ||
| return line(id, issue.account, issue.currency); | ||
| return rippleState(id, issue.account, issue.currency); | ||
| } | ||
|
Comment on lines
69
to
102
|
||
| /** @} */ | ||
|
|
||
|
|
@@ -149,7 +149,7 @@ static ticket_t const ticket{}; | |
|
|
||
| /** A SignerList */ | ||
| Keylet | ||
| signers(AccountID const& account) noexcept; | ||
| signerList(AccountID const& account) noexcept; | ||
|
|
||
| /** A Check */ | ||
| /** @{ */ | ||
|
|
@@ -209,7 +209,7 @@ escrow(AccountID const& src, std::uint32_t seq) noexcept; | |
|
|
||
| /** A PaymentChannel */ | ||
| Keylet | ||
| payChan(AccountID const& src, AccountID const& dst, std::uint32_t seq) noexcept; | ||
| payChannel(AccountID const& src, AccountID const& dst, std::uint32_t seq) noexcept; | ||
|
|
||
| /** NFT page keylets | ||
|
|
||
|
|
@@ -221,22 +221,22 @@ payChan(AccountID const& src, AccountID const& dst, std::uint32_t seq) noexcept; | |
| /** @{ */ | ||
| /** A keylet for the owner's first possible NFT page. */ | ||
| Keylet | ||
| nftpage_min(AccountID const& owner); | ||
| nftokenPage_min(AccountID const& owner); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be cammel case, as per the new clang-tidy rules. |
||
|
|
||
| /** A keylet for the owner's last possible NFT page. */ | ||
| Keylet | ||
| nftpage_max(AccountID const& owner); | ||
| nftokenPage_max(AccountID const& owner); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto, camel case |
||
|
|
||
| Keylet | ||
| nftpage(Keylet const& k, uint256 const& token); | ||
| nftokenPage(Keylet const& k, uint256 const& token); | ||
| /** @} */ | ||
|
|
||
| /** An offer from an account to buy or sell an NFT */ | ||
| Keylet | ||
| nftoffer(AccountID const& owner, std::uint32_t seq); | ||
| nftokenOffer(AccountID const& owner, std::uint32_t seq); | ||
|
|
||
| inline Keylet | ||
| nftoffer(uint256 const& offer) | ||
| nftokenOffer(uint256 const& offer) | ||
| { | ||
| return {ltNFTOKEN_OFFER, offer}; | ||
| } | ||
|
|
@@ -287,13 +287,13 @@ credential(uint256 const& key) noexcept | |
| } | ||
|
|
||
| Keylet | ||
| mptIssuance(std::uint32_t seq, AccountID const& issuer) noexcept; | ||
| mptokenIssuance(std::uint32_t seq, AccountID const& issuer) noexcept; | ||
|
|
||
| Keylet | ||
| mptIssuance(MPTID const& issuanceID) noexcept; | ||
| mptokenIssuance(MPTID const& issuanceID) noexcept; | ||
|
|
||
| inline Keylet | ||
| mptIssuance(uint256 const& issuanceKey) | ||
| mptokenIssuance(uint256 const& issuanceKey) | ||
| { | ||
| return {ltMPTOKEN_ISSUANCE, issuanceKey}; | ||
| } | ||
|
|
@@ -320,10 +320,10 @@ vault(uint256 const& vaultKey) | |
| } | ||
|
|
||
| Keylet | ||
| loanbroker(AccountID const& owner, std::uint32_t seq) noexcept; | ||
| loanBroker(AccountID const& owner, std::uint32_t seq) noexcept; | ||
|
|
||
| inline Keylet | ||
| loanbroker(uint256 const& key) | ||
| loanBroker(uint256 const& key) | ||
| { | ||
| return {ltLOAN_BROKER, key}; | ||
| } | ||
|
|
@@ -376,11 +376,15 @@ 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}, | ||
| {.function = &keylet::nftpage_max, .expectedLEName = jss::NFTokenPage, .includeInTests = true}, | ||
| {.function = &keylet::nftokenPage_min, | ||
| .expectedLEName = jss::NFTokenPage, | ||
| .includeInTests = true}, | ||
| {.function = &keylet::nftokenPage_max, | ||
| .expectedLEName = jss::NFTokenPage, | ||
| .includeInTests = true}, | ||
| {.function = &keylet::did, .expectedLEName = jss::DID, .includeInTests = true}}}; | ||
|
|
||
| MPTID | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename this to
trustLine? WhilerippleStateis the official object name, everywhere else it's referred to as trustline.