From 111951cc520fcb00210dfa6468a4a6f88bfaffc3 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 13 Jun 2013 15:23:38 -0700 Subject: [PATCH] Add lsfSell flag to indicate an offer was placed as a sell. --- modules/ripple_data/protocol/ripple_LedgerFormat.h | 1 + src/cpp/ripple/OfferCreateTransactor.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/ripple_data/protocol/ripple_LedgerFormat.h b/modules/ripple_data/protocol/ripple_LedgerFormat.h index 13e3d82809..02af945dcb 100644 --- a/modules/ripple_data/protocol/ripple_LedgerFormat.h +++ b/modules/ripple_data/protocol/ripple_LedgerFormat.h @@ -44,6 +44,7 @@ enum LedgerSpecificFlags // ltOFFER lsfPassive = 0x00010000, + lsfSell = 0x00020000, // True, offer was placed as a sell. // ltRIPPLE_STATE lsfLowReserve = 0x00010000, // True, if entry counts toward reserve. diff --git a/src/cpp/ripple/OfferCreateTransactor.cpp b/src/cpp/ripple/OfferCreateTransactor.cpp index 3e7112c487..6a7bdfba20 100644 --- a/src/cpp/ripple/OfferCreateTransactor.cpp +++ b/src/cpp/ripple/OfferCreateTransactor.cpp @@ -640,6 +640,9 @@ TER OfferCreateTransactor::doApply() if (bPassive) sleOffer->setFlag(lsfPassive); + if (bSell) + sleOffer->setFlag(lsfSell); + WriteLog (lsINFO, OfferCreateTransactor) << boost::str(boost::format("OfferCreate: final terResult=%s sleOffer=%s") % transToken(terResult) % sleOffer->getJson(0));