Files
rippled/src/libxrpl/protocol/Keylet.cpp
Denis Angell 84ce5482e6 feat: logging
2026-05-10 23:02:48 +02:00

28 lines
611 B
C++

#include <xrpl/protocol/Keylet.h>
#include <xrpl/beast/utility/instrumentation.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/basics/TraceLog.h>
namespace xrpl {
bool
Keylet::check(STLedgerEntry const& sle) const
{
TRACE_FUNC();
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