diff --git a/include/xrpl/protocol/Indexes.h b/include/xrpl/protocol/Indexes.h index 5a76119649..07493da0bd 100644 --- a/include/xrpl/protocol/Indexes.h +++ b/include/xrpl/protocol/Indexes.h @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -423,21 +422,8 @@ struct KeyletDesc bool includeInTests{}; }; -// This list should include all of the keylet functions that take a single -// AccountID parameter. -std::array, 6> const kDirectAccountKeylets{ - {{.function = &keylet::account, .expectedLEName = jss::AccountRoot, .includeInTests = false}, - {.function = &keylet::ownerDir, .expectedLEName = jss::DirectoryNode, .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::nftokenPageMin, - .expectedLEName = jss::NFTokenPage, - .includeInTests = true}, - {.function = &keylet::nftokenPageMax, - .expectedLEName = jss::NFTokenPage, - .includeInTests = true}, - {.function = &keylet::did, .expectedLEName = jss::DID, .includeInTests = true}}}; +// This list should include all of the keylet functions that take a single AccountID parameter. +extern std::array, 6> const kDirectAccountKeylets; MPTID makeMptID(std::uint32_t sequence, AccountID const& account); diff --git a/src/libxrpl/protocol/Indexes.cpp b/src/libxrpl/protocol/Indexes.cpp index 02a4932526..95416d0f2a 100644 --- a/src/libxrpl/protocol/Indexes.cpp +++ b/src/libxrpl/protocol/Indexes.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -32,6 +33,23 @@ namespace xrpl { +// This list should include all of the keylet functions that take a single +// AccountID parameter. Declared in Indexes.h; defined here so the header need +// not include jss.h. +std::array, 6> const kDirectAccountKeylets{ + {{.function = &keylet::account, .expectedLEName = jss::AccountRoot, .includeInTests = false}, + {.function = &keylet::ownerDir, .expectedLEName = jss::DirectoryNode, .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::nftokenPageMin, + .expectedLEName = jss::NFTokenPage, + .includeInTests = true}, + {.function = &keylet::nftokenPageMax, + .expectedLEName = jss::NFTokenPage, + .includeInTests = true}, + {.function = &keylet::did, .expectedLEName = jss::DID, .includeInTests = true}}}; + /** * Type-specific prefix for calculating ledger indices. *