mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
25 lines
558 B
C++
25 lines
558 B
C++
#include <xrpl/beast/utility/instrumentation.h>
|
|
#include <xrpl/protocol/Keylet.h>
|
|
#include <xrpl/protocol/LedgerFormats.h>
|
|
#include <xrpl/protocol/STLedgerEntry.h>
|
|
|
|
namespace xrpl {
|
|
|
|
bool
|
|
Keylet::check(STLedgerEntry const& sle) const
|
|
{
|
|
XRPL_ASSERT(
|
|
sle.getType() != ltANY || sle.getType() != ltCHILD,
|
|
"xrpl::Keylet::check : valid input type");
|
|
|
|
if (type == ltANY)
|
|
return true;
|
|
|
|
if (type == ltCHILD)
|
|
return sle.getType() != ltDIR_NODE;
|
|
|
|
return sle.getType() == type && sle.key() == key;
|
|
}
|
|
|
|
} // namespace xrpl
|