mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
Copyright (c) 2011-2013, OpenCoin, Inc.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#ifndef __OFFERCREATETRANSACTOR__
|
|
#define __OFFERCREATETRANSACTOR__
|
|
|
|
class OfferCreateTransactor : public Transactor
|
|
{
|
|
public:
|
|
OfferCreateTransactor (const SerializedTransaction& txn, TransactionEngineParams params, TransactionEngine* engine) : Transactor (txn, params, engine) {}
|
|
TER doApply ();
|
|
|
|
private:
|
|
bool bValidOffer (
|
|
SLE::ref sleOfferDir,
|
|
uint256 const& uOffer,
|
|
const uint160& uOfferOwnerID,
|
|
const STAmount& saOfferPays,
|
|
const STAmount& saOfferGets,
|
|
const uint160& uTakerAccountID,
|
|
boost::unordered_set<uint256>& usOfferUnfundedFound,
|
|
boost::unordered_set<uint256>& usOfferUnfundedBecame,
|
|
boost::unordered_set<uint160>& usAccountTouched,
|
|
STAmount& saOfferFunds);
|
|
|
|
TER takeOffers (
|
|
const bool bOpenLedger,
|
|
const bool bPassive,
|
|
const bool bSell,
|
|
uint256 const& uBookBase,
|
|
const uint160& uTakerAccountID,
|
|
SLE::ref sleTakerAccount,
|
|
const STAmount& saTakerPays,
|
|
const STAmount& saTakerGets,
|
|
STAmount& saTakerPaid,
|
|
STAmount& saTakerGot,
|
|
bool& bUnfunded);
|
|
|
|
boost::unordered_set<uint256> usOfferUnfundedFound; // Offers found unfunded.
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// vim:ts=4
|