1026 OTTrade* pOtherTrade = theOtherOffer.GetTrade();
1027 OTCron* pCron = theTrade.GetCron();
1032 "Offer was on the market, but somehow "
1033 "got into processing without a trade "
1039 OTPseudonym* pServerNym = pCron->GetServerNym();
1042 "Somehow a Market is running even though "
1043 "there is no Server Nym on the Cron "
1044 "object authorizing the trades.");
1046 const OTIdentifier SERVER_ID(pCron->GetServerID());
1048 if (pCron->GetTransactionCount() < 1) {
1049 otOut <<
"Failed to process trades: Out of transaction numbers!\n";
1059 if ((theTrade.GetSenderAcctID() == pOtherTrade->GetSenderAcctID()) ||
1060 (theTrade.GetSenderAcctID() == pOtherTrade->GetCurrencyAcctID()) ||
1061 (theTrade.GetCurrencyAcctID() == pOtherTrade->GetSenderAcctID()) ||
1062 (theTrade.GetCurrencyAcctID() == pOtherTrade->GetCurrencyAcctID())) {
1063 otLog5 <<
"Failed to process trades: they had account IDs in common.\n";
1098 const OTIdentifier FIRST_NYM_ID(
1099 theTrade.GetSenderUserID()),
1100 OTHER_NYM_ID(pOtherTrade->GetSenderUserID()),
1111 bool bFirstNymIsServerNym =
1112 ((FIRST_NYM_ID == SERVER_NYM_ID) ?
true :
false);
1113 bool bOtherNymIsServerNym =
1114 ((OTHER_NYM_ID == SERVER_NYM_ID) ?
true :
false);
1118 bool bTradersAreSameNym = ((FIRST_NYM_ID == OTHER_NYM_ID) ?
true :
false);
1121 OTPseudonym* pFirstNym =
nullptr;
1122 OTPseudonym* pOtherNym =
nullptr;
1126 if (bFirstNymIsServerNym)
1129 pFirstNym = pServerNym;
1133 theNym.SetIdentifier(FIRST_NYM_ID);
1135 if (!theNym.LoadPublicKey()) {
1136 OTString strNymID(FIRST_NYM_ID);
1137 otErr <<
"Failure loading First Nym public key in OTMarket::"
1138 << __FUNCTION__ <<
": " << strNymID <<
"\n";
1139 theTrade.FlagForRemoval();
1143 if (theNym.VerifyPseudonym() && theTrade.VerifySignature(*pServerNym) &&
1144 theOffer.VerifySignature(*pServerNym) &&
1145 theNym.LoadSignedNymfile(*pServerNym))
1150 pFirstNym = &theNym;
1153 OTString strNymID(FIRST_NYM_ID);
1154 otErr <<
"OTMarket::" << __FUNCTION__
1155 <<
": Failure verifying trade, offer, or nym, or loading "
1156 "signed Nymfile: " << strNymID <<
"\n";
1157 theTrade.FlagForRemoval();
1162 if (bOtherNymIsServerNym)
1165 pOtherNym = pServerNym;
1167 else if (bTradersAreSameNym)
1170 pOtherNym = pFirstNym;
1174 theOtherNym.SetIdentifier(OTHER_NYM_ID);
1176 if (!theOtherNym.LoadPublicKey()) {
1177 OTString strNymID(OTHER_NYM_ID);
1178 otErr <<
"Failure loading Other Nym public key in OTMarket::"
1179 << __FUNCTION__ <<
": " << strNymID <<
"\n";
1180 pOtherTrade->FlagForRemoval();
1184 if (theOtherNym.VerifyPseudonym() &&
1185 pOtherTrade->VerifySignature(*pServerNym) &&
1186 theOtherOffer.VerifySignature(*pServerNym) &&
1187 theOtherNym.LoadSignedNymfile(*pServerNym)) {
1188 pOtherNym = &theOtherNym;
1191 OTString strNymID(OTHER_NYM_ID);
1192 otErr <<
"Failure loading or verifying Other Nym public key in "
1193 "OTMarket::" << __FUNCTION__ <<
": " << strNymID <<
"\n";
1194 pOtherTrade->FlagForRemoval();
1227 OTAccount* pFirstAssetAcct =
1229 OTAccount* pFirstCurrencyAcct =
1233 pOtherTrade->GetSenderAcctID(), SERVER_ID);
1235 pOtherTrade->GetCurrencyAcctID(), SERVER_ID);
1237 if ((
nullptr == pFirstAssetAcct) || (
nullptr == pFirstCurrencyAcct)) {
1238 otOut <<
"ERROR verifying existence of one of the first trader's "
1239 "accounts during attempted Market trade.\n";
1241 pOtherAssetAcct, pOtherCurrencyAcct);
1242 theTrade.FlagForRemoval();
1245 else if ((
nullptr == pOtherAssetAcct) ||
1246 (
nullptr == pOtherCurrencyAcct)) {
1247 otOut <<
"ERROR verifying existence of one of the second trader's "
1248 "accounts during attempted Market trade.\n";
1250 pOtherAssetAcct, pOtherCurrencyAcct);
1251 pOtherTrade->FlagForRemoval();
1260 else if ((pFirstAssetAcct->GetAssetTypeID() !=
1263 (pFirstCurrencyAcct->GetAssetTypeID() !=
1267 otErr <<
"ERROR - First Trader has accounts of wrong "
1268 "asset types in OTMarket::" << __FUNCTION__ <<
"\n";
1270 pOtherAssetAcct, pOtherCurrencyAcct);
1271 theTrade.FlagForRemoval();
1274 else if ((pOtherAssetAcct->GetAssetTypeID() !=
1277 (pOtherCurrencyAcct->GetAssetTypeID() !=
1281 otErr <<
"ERROR - Other Trader has accounts of wrong "
1282 "asset types in OTMarket::" << __FUNCTION__ <<
"\n";
1284 pOtherAssetAcct, pOtherCurrencyAcct);
1285 pOtherTrade->FlagForRemoval();
1294 else if ((!pFirstAssetAcct->VerifyOwner(*pFirstNym) ||
1295 !pFirstAssetAcct->VerifySignature(*pServerNym)) ||
1296 (!pFirstCurrencyAcct->VerifyOwner(*pFirstNym) ||
1297 !pFirstCurrencyAcct->VerifySignature(*pServerNym))) {
1298 otErr <<
"ERROR verifying ownership or signature on one of first "
1299 "trader's accounts in OTMarket::" << __FUNCTION__ <<
"\n";
1301 pOtherAssetAcct, pOtherCurrencyAcct);
1302 theTrade.FlagForRemoval();
1305 else if ((!pOtherAssetAcct->VerifyOwner(*pOtherNym) ||
1306 !pOtherAssetAcct->VerifySignature(*pServerNym)) ||
1307 (!pOtherCurrencyAcct->VerifyOwner(*pOtherNym) ||
1308 !pOtherCurrencyAcct->VerifySignature(*pServerNym))) {
1309 otErr <<
"ERROR verifying ownership or signature on one of other "
1310 "trader's accounts in OTMarket::" << __FUNCTION__ <<
"\n";
1312 pOtherAssetAcct, pOtherCurrencyAcct);
1313 pOtherTrade->FlagForRemoval();
1331 OTLedger theFirstAssetInbox(FIRST_NYM_ID, theTrade.GetSenderAcctID(),
1333 theFirstCurrencyInbox(FIRST_NYM_ID, theTrade.GetCurrencyAcctID(),
1335 theOtherAssetInbox(OTHER_NYM_ID, pOtherTrade->GetSenderAcctID(),
1337 theOtherCurrencyInbox(OTHER_NYM_ID,
1338 pOtherTrade->GetCurrencyAcctID(), SERVER_ID);
1342 bool bSuccessLoadingFirstAsset = theFirstAssetInbox.LoadInbox();
1343 bool bSuccessLoadingFirstCurrency = theFirstCurrencyInbox.LoadInbox();
1344 bool bSuccessLoadingOtherAsset = theOtherAssetInbox.LoadInbox();
1345 bool bSuccessLoadingOtherCurrency = theOtherCurrencyInbox.LoadInbox();
1349 if (
true == bSuccessLoadingFirstAsset)
1350 bSuccessLoadingFirstAsset =
1351 theFirstAssetInbox.VerifyAccount(*pServerNym);
1353 bSuccessLoadingFirstAsset = theFirstAssetInbox.GenerateLedger(
1357 if (
true == bSuccessLoadingFirstCurrency)
1358 bSuccessLoadingFirstCurrency =
1359 theFirstCurrencyInbox.VerifyAccount(*pServerNym);
1361 bSuccessLoadingFirstCurrency = theFirstCurrencyInbox.GenerateLedger(
1365 if (
true == bSuccessLoadingOtherAsset)
1366 bSuccessLoadingOtherAsset =
1367 theOtherAssetInbox.VerifyAccount(*pServerNym);
1369 bSuccessLoadingOtherAsset = theOtherAssetInbox.GenerateLedger(
1373 if (
true == bSuccessLoadingOtherCurrency)
1374 bSuccessLoadingOtherCurrency =
1375 theOtherCurrencyInbox.VerifyAccount(*pServerNym);
1377 bSuccessLoadingOtherCurrency = theOtherCurrencyInbox.GenerateLedger(
1381 if ((
false == bSuccessLoadingFirstAsset) ||
1382 (
false == bSuccessLoadingFirstCurrency)) {
1383 otErr <<
"ERROR loading or generating an inbox for first trader in "
1384 "OTMarket::" << __FUNCTION__ <<
".\n";
1386 pOtherAssetAcct, pOtherCurrencyAcct);
1387 theTrade.FlagForRemoval();
1390 else if ((
false == bSuccessLoadingOtherAsset) ||
1391 (
false == bSuccessLoadingOtherCurrency)) {
1392 otErr <<
"ERROR loading or generating an inbox for other trader in "
1393 "OTMarket::" << __FUNCTION__ <<
".\n";
1395 pOtherAssetAcct, pOtherCurrencyAcct);
1396 pOtherTrade->FlagForRemoval();
1401 int64_t lNewTransactionNumber = pCron->GetNextTransactionNumber();
1405 if (0 == lNewTransactionNumber) {
1406 otOut <<
"WARNING: Market is unable to process because there "
1407 "are no more transaction numbers available.\n";
1409 pOtherAssetAcct, pOtherCurrencyAcct);
1462 lNewTransactionNumber);
1466 lNewTransactionNumber);
1470 lNewTransactionNumber);
1474 lNewTransactionNumber);
1578 OTAccount* pAssetAccountToDebit =
nullptr;
1579 OTAccount* pAssetAccountToCredit =
nullptr;
1580 OTAccount* pCurrencyAccountToDebit =
nullptr;
1581 OTAccount* pCurrencyAccountToCredit =
nullptr;
1583 if (theOffer.IsAsk())
1585 pAssetAccountToDebit = pFirstAssetAcct;
1588 pAssetAccountToCredit =
1591 pCurrencyAccountToDebit =
1594 pCurrencyAccountToCredit =
1600 pAssetAccountToDebit =
1603 pAssetAccountToCredit =
1606 pCurrencyAccountToDebit =
1609 pCurrencyAccountToCredit =
1616 int64_t lMinIncrementPerRound =
1617 ((theOffer.GetMinimumIncrement() >
1618 theOtherOffer.GetMinimumIncrement())
1619 ? theOffer.GetMinimumIncrement()
1620 : theOtherOffer.GetMinimumIncrement());
1622 const int64_t lMultiplier =
1623 (lMinIncrementPerRound /
GetScale());
1636 (lMultiplier * theOtherOffer.GetPriceLimit());
1658 int64_t lMostAvailable = ((theOffer.GetAmountAvailable() >
1659 theOtherOffer.GetAmountAvailable())
1660 ? theOtherOffer.GetAmountAvailable()
1661 : theOffer.GetAmountAvailable());
1663 int64_t lTemp = lMostAvailable %
GetScale();
1667 lMostAvailable -= lTemp;
1682 const int64_t lOverallMultiplier =
1689 const int64_t lMostPrice =
1690 (lOverallMultiplier * theOtherOffer.GetPriceLimit());
1696 if ((pAssetAccountToDebit->GetBalance() >= lMostAvailable) &&
1697 (pCurrencyAccountToDebit->GetBalance() >=
1701 lMinIncrementPerRound = lMostAvailable;
1702 lPrice = lMostPrice;
1725 bool bSuccess =
false;
1727 int64_t lOfferFinished = 0,
1728 lOtherOfferFinished = 0,
1736 while ((lMinIncrementPerRound <=
1737 (theOffer.GetAmountAvailable() -
1740 (lMinIncrementPerRound <=
1741 (theOtherOffer.GetAmountAvailable() -
1742 lOtherOfferFinished)) &&
1744 (lMinIncrementPerRound <=
1745 pAssetAccountToDebit->GetBalance()) &&
1750 pCurrencyAccountToDebit->GetBalance()))
1761 pAssetAccountToDebit->Debit(lMinIncrementPerRound);
1762 bool bMove2 = pCurrencyAccountToDebit->Debit(lPrice);
1764 pAssetAccountToCredit->Credit(lMinIncrementPerRound);
1765 bool bMove4 = pCurrencyAccountToCredit->Credit(lPrice);
1768 if (!bMove1 || !bMove2 || !bMove3 || !bMove4) {
1769 otErr <<
"Very strange! Funds were available, yet debit or "
1770 "credit failed while performing trade. "
1771 "Attempting rollback!\n";
1775 *pAssetAccountToDebit, bMove1, lMinIncrementPerRound,
1776 *pCurrencyAccountToDebit, bMove2, lPrice,
1777 *pAssetAccountToCredit, bMove3, lMinIncrementPerRound,
1778 *pCurrencyAccountToCredit, bMove4, lPrice);
1793 lOfferFinished += lMinIncrementPerRound;
1794 lOtherOfferFinished += lMinIncrementPerRound;
1796 lTotalPaidOut += lPrice;
1813 if (
true == bSuccess) {
1844 theTrade.IncrementTradesAlreadyDone();
1845 pOtherTrade->IncrementTradesAlreadyDone();
1847 theOffer.IncrementFinishedSoFar(lOfferFinished);
1852 theOtherOffer.IncrementFinishedSoFar(
1853 lOtherOfferFinished);
1857 theTrade.ReleaseSignatures();
1858 theTrade.SignContract(*pServerNym);
1859 theTrade.SaveContract();
1861 pOtherTrade->ReleaseSignatures();
1862 pOtherTrade->SignContract(*pServerNym);
1863 pOtherTrade->SaveContract();
1865 theOffer.ReleaseSignatures();
1866 theOffer.SignContract(*pServerNym);
1867 theOffer.SaveContract();
1869 theOtherOffer.ReleaseSignatures();
1870 theOtherOffer.SignContract(*pServerNym);
1871 theOtherOffer.SaveContract();
1874 theOtherOffer.GetPriceLimit();
1879 if (
nullptr == m_pTradeList) {
1880 m_pTradeList =
dynamic_cast<OTDB::TradeListMarket*
>(
1885 std::unique_ptr<OTDB::TradeDataMarket> pTradeData(
1889 const int64_t& lTransactionNum =
1890 theOffer.GetTransactionNum();
1892 const int64_t& lPriceLimit =
1893 theOtherOffer.GetPriceLimit();
1894 const int64_t& lAmountSold = lOfferFinished;
1896 pTradeData->transaction_id =
1897 to_string<int64_t>(lTransactionNum);
1898 pTradeData->date = to_string<time64_t>(theDate);
1899 pTradeData->price = to_string<int64_t>(lPriceLimit);
1900 pTradeData->amount_sold = to_string<int64_t>(lAmountSold);
1902 m_strLastSaleDate = pTradeData->date;
1909 m_pTradeList->AddTradeDataMarket(*pTradeData);
1914 while (m_pTradeList->GetTradeDataMarketCount() >
1916 m_pTradeList->RemoveTradeDataMarket(0);
1966 pTrans1->SetReferenceToNum(theTrade.GetTransactionNum());
1967 pTrans2->SetReferenceToNum(theTrade.GetTransactionNum());
1968 pTrans3->SetReferenceToNum(pOtherTrade->GetTransactionNum());
1969 pTrans4->SetReferenceToNum(pOtherTrade->GetTransactionNum());
1976 OTCronItem* pOrigTrade =
nullptr;
1977 OTCronItem* pOrigOtherTrade =
nullptr;
1992 "Signature was already verified on Trade when first "
1993 "added to market, but now it fails.\n");
1995 "Signature was already verified on Trade when first "
1996 "added to market, but now it fails.\n");
2005 OTString strOrigTrade(*pOrigTrade),
2006 strOrigOtherTrade(*pOrigOtherTrade);
2014 pTrans1->SetReferenceString(strOrigTrade);
2015 pTrans2->SetReferenceString(strOrigTrade);
2016 pTrans3->SetReferenceString(strOrigOtherTrade);
2017 pTrans4->SetReferenceString(strOrigOtherTrade);
2023 pOrigTrade =
nullptr;
2024 delete pOrigOtherTrade;
2025 pOrigOtherTrade =
nullptr;
2037 OTString strTrade(theTrade), strOtherTrade(*pOtherTrade),
2038 strOffer(theOffer), strOtherOffer(theOtherOffer);
2042 pItem1->SetNote(strTrade);
2043 pItem2->SetNote(strTrade);
2044 pItem3->SetNote(strOtherTrade);
2045 pItem4->SetNote(strOtherTrade);
2071 pItem1->SetAttachment(strOffer);
2072 pItem2->SetAttachment(strOffer);
2073 pItem3->SetAttachment(strOtherOffer);
2074 pItem4->SetAttachment(strOtherOffer);
2084 if (theOffer.IsAsk())
2086 pItem1->SetAmount(lOfferFinished * (-1));
2087 pItem2->SetAmount(lTotalPaidOut);
2088 pItem3->SetAmount(lOtherOfferFinished);
2089 pItem4->SetAmount(lTotalPaidOut * (-1));
2093 pItem1->SetAmount(lOfferFinished);
2094 pItem2->SetAmount(lTotalPaidOut * (-1));
2095 pItem3->SetAmount(lOtherOfferFinished * (-1));
2096 pItem4->SetAmount(lTotalPaidOut);
2099 if (
true == bSuccess) {
2101 pItem1->SignContract(*pServerNym);
2102 pItem2->SignContract(*pServerNym);
2103 pItem3->SignContract(*pServerNym);
2104 pItem4->SignContract(*pServerNym);
2106 pItem1->SaveContract();
2107 pItem2->SaveContract();
2108 pItem3->SaveContract();
2109 pItem4->SaveContract();
2113 pTrans1->AddItem(*pItem1);
2114 pTrans2->AddItem(*pItem2);
2115 pTrans3->AddItem(*pItem3);
2116 pTrans4->AddItem(*pItem4);
2118 pTrans1->SignContract(*pServerNym);
2119 pTrans2->SignContract(*pServerNym);
2120 pTrans3->SignContract(*pServerNym);
2121 pTrans4->SignContract(*pServerNym);
2123 pTrans1->SaveContract();
2124 pTrans2->SaveContract();
2125 pTrans3->SaveContract();
2126 pTrans4->SaveContract();
2130 theFirstAssetInbox.AddTransaction(*pTrans1);
2131 theFirstCurrencyInbox.AddTransaction(*pTrans2);
2132 theOtherAssetInbox.AddTransaction(*pTrans3);
2133 theOtherCurrencyInbox.AddTransaction(*pTrans4);
2137 theFirstAssetInbox.ReleaseSignatures();
2138 theFirstCurrencyInbox.ReleaseSignatures();
2139 theOtherAssetInbox.ReleaseSignatures();
2140 theOtherCurrencyInbox.ReleaseSignatures();
2143 theFirstAssetInbox.SignContract(*pServerNym);
2144 theFirstCurrencyInbox.SignContract(*pServerNym);
2145 theOtherAssetInbox.SignContract(*pServerNym);
2146 theOtherCurrencyInbox.SignContract(*pServerNym);
2149 theFirstAssetInbox.SaveContract();
2150 theFirstCurrencyInbox.SaveContract();
2151 theOtherAssetInbox.SaveContract();
2152 theOtherCurrencyInbox.SaveContract();
2159 pFirstAssetAcct->SaveInbox(theFirstAssetInbox);
2160 pFirstCurrencyAcct->SaveInbox(theFirstCurrencyInbox);
2161 pOtherAssetAcct->SaveInbox(theOtherAssetInbox);
2162 pOtherCurrencyAcct->SaveInbox(theOtherCurrencyInbox);
2167 pTrans1->SaveBoxReceipt(theFirstAssetInbox);
2168 pTrans2->SaveBoxReceipt(theFirstCurrencyInbox);
2169 pTrans3->SaveBoxReceipt(theOtherAssetInbox);
2170 pTrans4->SaveBoxReceipt(theOtherCurrencyInbox);
2173 pFirstAssetAcct->ReleaseSignatures();
2174 pFirstCurrencyAcct->ReleaseSignatures();
2175 pOtherAssetAcct->ReleaseSignatures();
2176 pOtherCurrencyAcct->ReleaseSignatures();
2177 pFirstAssetAcct->SignContract(*pServerNym);
2178 pFirstCurrencyAcct->SignContract(*pServerNym);
2179 pOtherAssetAcct->SignContract(*pServerNym);
2180 pOtherCurrencyAcct->SignContract(*pServerNym);
2181 pFirstAssetAcct->SaveContract();
2182 pFirstCurrencyAcct->SaveContract();
2183 pOtherAssetAcct->SaveContract();
2184 pOtherCurrencyAcct->SaveContract();
2185 pFirstAssetAcct->SaveAccount();
2186 pFirstCurrencyAcct->SaveAccount();
2187 pOtherAssetAcct->SaveAccount();
2188 pOtherCurrencyAcct->SaveAccount();
2195 otWarn <<
"Unable to perform trade in OTMarket::"
2196 << __FUNCTION__ <<
"\n";
2200 bool bFirstTraderIsBroke =
false, bOtherTraderIsBroke =
false;
2218 if (pAssetAccountToDebit->GetBalance() <
2219 lMinIncrementPerRound) {
2220 OTItem* pTempItem =
nullptr;
2221 OTTransaction* pTempTransaction =
nullptr;
2222 OTLedger* pTempInbox =
nullptr;
2224 if (pAssetAccountToDebit == pFirstAssetAcct) {
2226 bFirstTraderIsBroke =
true;
2227 pTempTransaction = pTrans1;
2228 pTempInbox = &theFirstAssetInbox;
2238 bOtherTraderIsBroke =
true;
2239 pTempTransaction = pTrans3;
2240 pTempInbox = &theOtherAssetInbox;
2249 pTempItem->SignContract(*pServerNym);
2250 pTempItem->SaveContract();
2252 pTempTransaction->AddItem(*pTempItem);
2253 pTempTransaction->SignContract(*pServerNym);
2254 pTempTransaction->SaveContract();
2256 pTempInbox->AddTransaction(*pTempTransaction);
2258 pTempInbox->ReleaseSignatures();
2259 pTempInbox->SignContract(*pServerNym);
2260 pTempInbox->SaveContract();
2261 pTempInbox->SaveInbox();
2263 pTempTransaction->SaveBoxReceipt(*pTempInbox);
2279 if (pCurrencyAccountToDebit->GetBalance() < lPrice) {
2280 OTItem* pTempItem =
nullptr;
2281 OTTransaction* pTempTransaction =
nullptr;
2282 OTLedger* pTempInbox =
nullptr;
2284 if (pCurrencyAccountToDebit == pFirstCurrencyAcct) {
2286 bFirstTraderIsBroke =
true;
2287 pTempTransaction = pTrans2;
2288 pTempInbox = &theFirstCurrencyInbox;
2298 bOtherTraderIsBroke =
true;
2299 pTempTransaction = pTrans4;
2300 pTempInbox = &theOtherCurrencyInbox;
2309 pTempItem->SignContract(*pServerNym);
2310 pTempItem->SaveContract();
2312 pTempTransaction->AddItem(*pTempItem);
2313 pTempTransaction->SignContract(*pServerNym);
2314 pTempTransaction->SaveContract();
2316 pTempInbox->AddTransaction(*pTempTransaction);
2318 pTempInbox->ReleaseSignatures();
2319 pTempInbox->SignContract(*pServerNym);
2320 pTempInbox->SaveContract();
2321 pTempInbox->SaveInbox();
2323 pTempTransaction->SaveBoxReceipt(*pTempInbox);
2340 if (bFirstTraderIsBroke) theTrade.FlagForRemoval();
2341 if (bOtherTraderIsBroke) pOtherTrade->FlagForRemoval();
2348 pOtherCurrencyAcct);
EXPORT Storable * CreateObject(StoredObjectType eType)
static EXPORT OTTransaction * GenerateTransaction(const OTIdentifier &theUserID, const OTIdentifier &theAccountID, const OTIdentifier &theServerID, transactionType theType, int64_t lTransactionNum=0)
static EXPORT OTCronItem * LoadCronReceipt(const int64_t &lTransactionNum)
OTLOG_IMPORT OTLogStream otOut
const OTIdentifier & GetCurrencyID() const
const OTIdentifier & GetAssetID() const
static EXPORT OTItem * CreateItemFromTransaction(const OTTransaction &theOwner, OTItem::itemType theType, const OTIdentifier *pDestinationAcctID=nullptr)
time64_t OTTimeGetCurrentTime()
#define OT_ASSERT_MSG(x, s)
void cleanup_four_accounts(OTAccount *p1, OTAccount *p2, OTAccount *p3, OTAccount *p4)
void rollback_four_accounts(OTAccount &p1, bool b1, const int64_t &a1, OTAccount &p2, bool b2, const int64_t &a2, OTAccount &p3, bool b3, const int64_t &a3, OTAccount &p4, bool b4, const int64_t &a4)
OTLOG_IMPORT OTLogStream otWarn
const int64_t & GetScale() const
OTLOG_IMPORT OTLogStream otErr
#define MAX_MARKET_QUERY_DEPTH
static EXPORT OTAccount * LoadExistingAccount(const OTIdentifier &accountId, const OTIdentifier &serverId)
OTLOG_IMPORT OTLogStream otLog5