mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix Subscribe RPC to correctly distinguish bids and asks.
This commit is contained in:
committed by
Vinnie Falco
parent
799d9a73e6
commit
cca5421aed
@@ -94,6 +94,12 @@ void hash_append (Hasher& h, BookType<ByValue> const& b)
|
||||
hash_append (h, b.in, b.out);
|
||||
}
|
||||
|
||||
template <bool ByValue>
|
||||
BookType<ByValue> reversed (BookType<ByValue> const& book)
|
||||
{
|
||||
return BookType<ByValue> (book.out, book.in);
|
||||
}
|
||||
|
||||
/** Ordered comparison. */
|
||||
template <bool LhsByValue, bool RhsByValue>
|
||||
int compare (BookType <LhsByValue> const& lhs,
|
||||
|
||||
@@ -322,7 +322,7 @@ Json::Value doSubscribe (RPC::Context& context)
|
||||
|
||||
context.netOps.getBookPage (
|
||||
context.role == Role::ADMIN,
|
||||
lpLedger, book, raTakerID.getAccountID (),
|
||||
lpLedger, reverse (book), raTakerID.getAccountID (),
|
||||
false, 0, jvMarker, jvAsks);
|
||||
|
||||
if (jvAsks.isMember (jss::offers))
|
||||
|
||||
Reference in New Issue
Block a user