Files
rippled/src/libxrpl/protocol/Book.cpp
Bart 1d42c4f6de refactor: Remove unnecessary copyright notices already covered by LICENSE.md (#5929)
Per XLS-0095, we are taking steps to rename ripple(d) to xrpl(d).

This change specifically removes all copyright notices referencing Ripple, XRPLF, and certain affiliated contributors upon mutual agreement, so the notice in the LICENSE.md file applies throughout. Copyright notices referencing external contributions remain as-is. Duplicate verbiage is also removed.
2025-11-04 08:33:42 +00:00

36 lines
572 B
C++

#include <xrpl/protocol/Book.h>
#include <xrpl/protocol/Issue.h>
#include <ostream>
#include <string>
namespace ripple {
bool
isConsistent(Book const& book)
{
return isConsistent(book.in) && isConsistent(book.out) &&
book.in != book.out;
}
std::string
to_string(Book const& book)
{
return to_string(book.in) + "->" + to_string(book.out);
}
std::ostream&
operator<<(std::ostream& os, Book const& x)
{
os << to_string(x);
return os;
}
Book
reversed(Book const& book)
{
return Book(book.out, book.in, book.domain);
}
} // namespace ripple