Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions | Variables
mastercore Namespace Reference

Classes

class  MetaDEx_compare
 

Typedefs

typedef std::map< uint256, CMPPendingPendingMap
 
typedef std::map< string, CMPOfferOfferMap
 
typedef std::map< string, CMPAcceptAcceptMap
 
typedef std::pair< uint64_t, uint64_t > MetaDExTypePrice
 
typedef std::set< CMPMetaDEx, MetaDEx_comparemd_Set
 
typedef std::map< XDOUBLE, md_Setmd_PricesMap
 
typedef std::map< unsigned int, md_PricesMapmd_PropertiesMap
 
typedef std::map< string, CMPCrowdCrowdMap
 

Functions

string strMPProperty (unsigned int i)
 
int GetHeight (void)
 
uint32_t GetLatestBlockTime (void)
 
bool isPropertyDivisible (unsigned int propertyId)
 
string getPropertyName (unsigned int propertyId)
 
bool isCrowdsaleActive (unsigned int propertyId)
 
bool isCrowdsalePurchase (uint256 txid, string address, int64_t *propertyId=NULL, int64_t *userTokens=NULL, int64_t *issuerTokens=NULL)
 
bool isMPinBlockRange (int starting_block, int ending_block, bool bDeleteFound)
 
std::string FormatIndivisibleMP (int64_t n)
 
int ClassB_send (const string &senderAddress, const string &receiverAddress, const string &redemptionAddress, const vector< unsigned char > &data, uint256 &txid, int64_t additional=0)
 
uint256 send_INTERNAL_1packet (const string &FromAddress, const string &ToAddress, const string &RedeemAddress, unsigned int PropertyID, uint64_t Amount, unsigned int PropertyID_2, uint64_t Amount_2, unsigned int TransactionType, int64_t additional, int *error_code=NULL)
 
bool isTestEcosystemProperty (unsigned int property)
 
bool isMainEcosystemProperty (unsigned int property)
 
CMPTallygetTally (const string &address)
 
bool isMetaDExOfferActive (const uint256 txid, unsigned int propertyId)
 
int64_t getTotalTokens (unsigned int propertyId, int64_t *n_owners_total=NULL)
 
bool checkExpiredAlerts (unsigned int curBlock, uint64_t curTime)
 
int set_wallet_totals ()
 
char * c_strMasterProtocolTXType (int i)
 
bool isTransactionTypeAllowed (int txBlock, unsigned int txProperty, unsigned int txType, unsigned short version, bool bAllowNullProperty=false)
 
bool getValidMPTX (const uint256 &txid, int *block=NULL, unsigned int *type=NULL, uint64_t *nAmended=NULL)
 
bool update_tally_map (string who, unsigned int which_currency, int64_t amount, TallyType ttype)
 
std::string getMasterCoreAlertString ()
 
static bool isBigEndian ()
 
uint64_t rounduint64 (long double)
 Converts numbers to 64 bit wide unsigned integer whereby any signedness is ignored. More...
 
void swapByteOrder16 (uint16_t &)
 Swaps byte order on little-endian systems and does nothing otherwise. More...
 
void swapByteOrder32 (uint32_t &ui)
 
void swapByteOrder64 (uint64_t &ull)
 
bool DEx_offerExists (const string &seller_addr, unsigned int)
 
CMPOfferDEx_getOffer (const string &seller_addr, unsigned int)
 
CMPAcceptDEx_getAccept (const string &seller_addr, unsigned int, const string &buyer_addr)
 
int DEx_offerCreate (string seller_addr, unsigned int, uint64_t nValue, int block, uint64_t amount_desired, uint64_t fee, unsigned char btl, const uint256 &txid, uint64_t *nAmended=NULL)
 
int DEx_offerDestroy (const string &seller_addr, unsigned int)
 
int DEx_offerUpdate (const string &seller_addr, unsigned int, uint64_t nValue, int block, uint64_t desired, uint64_t fee, unsigned char btl, const uint256 &txid, uint64_t *nAmended=NULL)
 
int DEx_acceptCreate (const string &buyer, const string &seller, int, uint64_t nValue, int block, uint64_t fee_paid, uint64_t *nAmended=NULL)
 
int DEx_acceptDestroy (const string &buyer, const string &seller, int, bool bForceErase=false)
 
int DEx_payment (uint256 txid, unsigned int vout, string seller, string buyer, uint64_t BTC_paid, int blockNow, uint64_t *nAmended=NULL)
 
int MetaDEx_ADD (const string &sender_addr, unsigned int, uint64_t, int block, unsigned int property_desired, uint64_t amount_desired, const uint256 &txid, unsigned int idx)
 
int MetaDEx_CANCEL_AT_PRICE (const uint256, unsigned int, const string &, unsigned int, uint64_t, unsigned int, uint64_t)
 
int MetaDEx_CANCEL_ALL_FOR_PAIR (const uint256, unsigned int, const string &, unsigned int, unsigned int)
 
int MetaDEx_CANCEL_EVERYTHING (const uint256, unsigned int, const string &)
 
md_PricesMapget_Prices (unsigned int prop)
 
md_Setget_Indexes (md_PricesMap *p, XDOUBLE price)
 
void MetaDEx_debug_print (bool bShowPriceLevel=false, bool bDisplay=false)
 
int64_t StrToInt64 (const std::string &str, bool divisible)
 
char * c_strPropertyType (int i)
 
CMPCrowdgetCrowd (const string &address)
 
int calculateFractional (unsigned short int propType, unsigned char bonusPerc, uint64_t fundraiserSecs, uint64_t numProps, unsigned char issuerPerc, const std::map< std::string, std::vector< uint64_t > > txFundraiserData, const uint64_t amountPremined)
 
void eraseMaxedCrowdsale (const string &address, uint64_t blockTime, int block)
 
unsigned int eraseExpiredCrowdsale (CBlockIndex const *pBlockIndex)
 
void dumpCrowdsaleInfo (const string &address, CMPCrowd &crowd, bool bExpired=false)
 

Variables

std::map< string, CMPTallymp_tally_map
 
CMPTxListp_txlistdb
 
CMPTradeListt_tradelistdb
 
CMPSTOLists_stolistdb
 
OfferMap my_offers
 
AcceptMap my_accepts
 
md_PropertiesMap metadex
 
CMPSPInfo_my_sps
 
CrowdMap my_crowds
 

Typedef Documentation

typedef std::map<string, CMPAccept> mastercore::AcceptMap

Definition at line 259 of file mastercore_dex.h.

typedef std::map<string, CMPCrowd> mastercore::CrowdMap

Definition at line 489 of file mastercore_sp.h.

typedef std::map< XDOUBLE , md_Set > mastercore::md_PricesMap

Definition at line 277 of file mastercore_dex.h.

typedef std::map< unsigned int, md_PricesMap > mastercore::md_PropertiesMap

Definition at line 278 of file mastercore_dex.h.

Definition at line 274 of file mastercore_dex.h.

typedef std::pair< uint64_t, uint64_t > mastercore::MetaDExTypePrice

Definition at line 264 of file mastercore_dex.h.

typedef std::map<string, CMPOffer> mastercore::OfferMap

Definition at line 258 of file mastercore_dex.h.

Definition at line 509 of file mastercore.h.

Function Documentation

char * mastercore::c_strMasterProtocolTXType ( int  i)
char * mastercore::c_strPropertyType ( int  i)

Definition at line 577 of file mastercore_sp.cpp.

References MSC_PROPERTY_TYPE_DIVISIBLE, and MSC_PROPERTY_TYPE_INDIVISIBLE.

Referenced by CMPTransaction::step2_SmartProperty().

+ Here is the caller graph for this function:

int mastercore::calculateFractional ( unsigned short int  propType,
unsigned char  bonusPerc,
uint64_t  fundraiserSecs,
uint64_t  numProps,
unsigned char  issuerPerc,
const std::map< std::string, std::vector< uint64_t > >  txFundraiserData,
const uint64_t  amountPremined 
)

Definition at line 323 of file mastercore_sp.cpp.

References MSC_PROPERTY_TYPE_DIVISIBLE.

Referenced by eraseExpiredCrowdsale(), and CMPTransaction::interpretPacket().

+ Here is the caller graph for this function:

bool mastercore::checkExpiredAlerts ( unsigned int  curBlock,
uint64_t  curTime 
)

Definition at line 535 of file mastercore.cpp.

References chainActive, GetBoolArg(), global_alert_message, CChain::Height(), isTransactionTypeAllowed(), OMNI_PROPERTY_MSC, OMNICORE_VERSION_BASE, and StartShutdown().

Referenced by mastercore_handler_block_end(), and CMPTxList::setLastAlert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::ClassB_send ( const string &  senderAddress,
const string &  receiverAddress,
const string &  redemptionAddress,
const vector< unsigned char > &  data,
uint256 txid,
int64_t  additional = 0 
)
int mastercore::DEx_acceptCreate ( const string &  buyer,
const string &  seller,
int  prop,
uint64_t  nValue,
int  block,
uint64_t  fee_paid,
uint64_t *  nAmended = NULL 
)

Definition at line 515 of file mastercore_dex.cpp.

References ACCEPT_RESERVE, DEX_ERROR_ACCEPT, DEx_getAccept(), CMPOffer::getBlockTimeLimit(), CMPOffer::getBTCDesiredOriginal(), CMPOffer::getHash(), base_uint< BITS >::GetHex(), CMPOffer::getMinFee(), getMPbalance(), CMPOffer::getOfferAmountOriginal(), CMPOffer::getProperty(), msc_debug_dex, my_accepts, my_offers, SELLOFFER_RESERVE, STR_ACCEPT_ADDR_PROP_ADDR_COMBO, STR_SELLOFFER_ADDR_PROP_COMBO, and update_tally_map().

Referenced by CMPTransaction::logicMath_AcceptOffer_BTC().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::DEx_acceptDestroy ( const string &  buyer,
const string &  seller,
int  prop,
bool  bForceErase = false 
)

Definition at line 574 of file mastercore_dex.cpp.

References ACCEPT_RESERVE, BALANCE, DEX_ERROR_ACCEPT, DEx_getAccept(), DEx_getOffer(), CMPAccept::getAcceptAmountRemaining(), CMPOffer::getHash(), CMPAccept::getHash(), base_uint< BITS >::GetHex(), my_accepts, SELLOFFER_RESERVE, STR_ACCEPT_ADDR_PROP_ADDR_COMBO, and update_tally_map().

Referenced by DEx_payment(), and eraseExpiredAccepts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CMPAccept * mastercore::DEx_getAccept ( const string &  seller_addr,
unsigned int  prop,
const string &  buyer_addr 
)

Definition at line 412 of file mastercore_dex.cpp.

References msc_debug_dex, my_accepts, and STR_ACCEPT_ADDR_PROP_ADDR_COMBO.

Referenced by DEx_acceptCreate(), DEx_acceptDestroy(), and DEx_payment().

+ Here is the caller graph for this function:

CMPOffer * mastercore::DEx_getOffer ( const string &  seller_addr,
unsigned int  prop 
)

Definition at line 400 of file mastercore_dex.cpp.

References msc_debug_dex, my_offers, and STR_SELLOFFER_ADDR_PROP_COMBO.

Referenced by DEx_acceptDestroy(), and DEx_offerCreate().

+ Here is the caller graph for this function:

int mastercore::DEx_offerCreate ( string  seller_addr,
unsigned int  prop,
uint64_t  nValue,
int  block,
uint64_t  amount_desired,
uint64_t  fee,
unsigned char  btl,
const uint256 txid,
uint64_t *  nAmended = NULL 
)

Definition at line 424 of file mastercore_dex.cpp.

References BALANCE, DEX_ERROR_SELLOFFER, DEx_getOffer(), getMPbalance(), msc_debug_dex, my_offers, rounduint64(), SELLOFFER_RESERVE, STR_SELLOFFER_ADDR_PROP_COMBO, and update_tally_map().

Referenced by DEx_offerUpdate(), and CMPTransaction::logicMath_TradeOffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::DEx_offerDestroy ( const string &  seller_addr,
unsigned int  prop 
)

Definition at line 468 of file mastercore_dex.cpp.

References BALANCE, DEX_ERROR_SELLOFFER, DEx_offerExists(), getMPbalance(), msc_debug_dex, my_offers, SELLOFFER_RESERVE, STR_SELLOFFER_ADDR_PROP_COMBO, and update_tally_map().

Referenced by DEx_offerUpdate(), DEx_payment(), and CMPTransaction::logicMath_TradeOffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::DEx_offerExists ( const string &  seller_addr,
unsigned int  prop 
)

Definition at line 389 of file mastercore_dex.cpp.

References my_offers, and STR_SELLOFFER_ADDR_PROP_COMBO.

Referenced by DEx_offerDestroy(), DEx_offerUpdate(), and CMPTransaction::logicMath_TradeOffer().

+ Here is the caller graph for this function:

int mastercore::DEx_offerUpdate ( const string &  seller_addr,
unsigned int  prop,
uint64_t  nValue,
int  block,
uint64_t  desired,
uint64_t  fee,
unsigned char  btl,
const uint256 txid,
uint64_t *  nAmended = NULL 
)

Definition at line 496 of file mastercore_dex.cpp.

References DEX_ERROR_SELLOFFER, DEx_offerCreate(), DEx_offerDestroy(), and DEx_offerExists().

Referenced by CMPTransaction::logicMath_TradeOffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::DEx_payment ( uint256  txid,
unsigned int  vout,
string  seller,
string  buyer,
uint64_t  BTC_paid,
int  blockNow,
uint64_t *  nAmended = NULL 
)

Definition at line 639 of file mastercore_dex.cpp.

References ACCEPT_RESERVE, BALANCE, DEx_acceptDestroy(), DEX_ERROR_PAYMENT, DEx_getAccept(), DEx_offerDestroy(), CMPAccept::getAcceptAmountRemaining(), CMPAccept::getBTCDesiredOriginal(), getMPbalance(), CMPAccept::getOfferAmountOriginal(), msc_debug_dex, OMNI_PROPERTY_MSC, OMNI_PROPERTY_TMSC, p_txlistdb, CMPTxList::recordPaymentTX(), CMPAccept::reduceAcceptAmountRemaining_andIsZero(), rounduint64(), SELLOFFER_RESERVE, and update_tally_map().

Referenced by parseTransaction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mastercore::dumpCrowdsaleInfo ( const string &  address,
CMPCrowd crowd,
bool  bExpired = false 
)

Definition at line 297 of file mastercore_sp.cpp.

References DateTimeStrFormat(), GetDataDir(), GetTime(), INFO_FILENAME, and CMPCrowd::print().

Referenced by eraseExpiredCrowdsale(), eraseMaxedCrowdsale(), and CMPTransaction::interpretPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int mastercore::eraseExpiredCrowdsale ( CBlockIndex const *  pBlockIndex)

Definition at line 514 of file mastercore_sp.cpp.

References _my_sps, BALANCE, calculateFractional(), CMPSPInfo::Entry::deadline, dumpCrowdsaleInfo(), CMPSPInfo::Entry::early_bird, CBlockIndex::GetBlockHash(), CBlockIndex::GetBlockTime(), CMPCrowd::getDatabase(), CMPCrowd::getDeadline(), CMPCrowd::getIssuerCreated(), CMPCrowd::getPropertyId(), CMPSPInfo::getSP(), CMPSPInfo::Entry::historicalData, CMPSPInfo::Entry::issuer, CMPSPInfo::Entry::missedTokens, my_crowds, CMPSPInfo::Entry::num_tokens, CMPSPInfo::Entry::percentage, CMPSPInfo::Entry::prop_type, CMPSPInfo::Entry::update_block, update_tally_map(), and CMPSPInfo::updateSP().

Referenced by mastercore_handler_block_begin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mastercore::eraseMaxedCrowdsale ( const string &  address,
uint64_t  blockTime,
int  block 
)

Definition at line 482 of file mastercore_sp.cpp.

References _my_sps, chainActive, CMPSPInfo::Entry::close_early, dumpCrowdsaleInfo(), CMPCrowd::getDatabase(), CMPCrowd::getPropertyId(), CMPSPInfo::getSP(), CMPSPInfo::Entry::historicalData, CMPSPInfo::Entry::max_tokens, my_crowds, CMPSPInfo::Entry::timeclosed, CMPSPInfo::Entry::update_block, and CMPSPInfo::updateSP().

Referenced by CMPTransaction::logicMath_SimpleSend().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string mastercore::FormatIndivisibleMP ( int64_t  n)

Definition at line 343 of file mastercore.cpp.

References strprintf.

Referenced by MatrixModel::fillin(), FormatMP(), getinfo_MP(), CMPTradeList::getMatchingTrades(), CMPSTOList::getRecipients(), SendMPDialog::sendMPTransaction(), and SendMPDialog::updateBalances().

+ Here is the caller graph for this function:

md_Set * mastercore::get_Indexes ( md_PricesMap p,
XDOUBLE  price 
)

Definition at line 74 of file mastercore_dex.cpp.

Referenced by input_mp_offers_string(), and MetaDEx_ADD().

+ Here is the caller graph for this function:

md_PricesMap * mastercore::get_Prices ( unsigned int  prop)

Definition at line 65 of file mastercore_dex.cpp.

References metadex.

Referenced by input_mp_offers_string(), MetaDEx_ADD(), MetaDEx_CANCEL_ALL_FOR_PAIR(), MetaDEx_CANCEL_AT_PRICE(), and x_Trade().

+ Here is the caller graph for this function:

CMPCrowd * mastercore::getCrowd ( const string &  address)

Definition at line 259 of file mastercore_sp.cpp.

References my_crowds.

Referenced by CMPTransaction::interpretPacket(), isCrowdsalePurchase(), and CMPTransaction::logicMath_SimpleSend().

+ Here is the caller graph for this function:

int mastercore::GetHeight ( void  )

Definition at line 160 of file mastercore.cpp.

References chainActive, cs_main, CChain::Height(), LOCK, and nBlockTop.

Referenced by ConnectTip(), DisconnectTip(), isMPinBlockRange(), listblocktransactions_MP(), msc_initial_scan(), mscrpc(), populateRPCTransactionObject(), RegisterNodeSignals(), UnregisterNodeSignals(), and writePersistence().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t mastercore::GetLatestBlockTime ( void  )

Definition at line 168 of file mastercore.cpp.

References chainActive, cs_main, CChainParams::GenesisBlock(), CBlockIndex::GetBlockTime(), LOCK, CBlockHeader::nTime, Params(), and CChain::Tip().

Referenced by SendMPDialog::sendMPTransaction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string mastercore::getMasterCoreAlertString ( )

Definition at line 530 of file mastercore.cpp.

References global_alert_message.

Referenced by getinfo_MP(), and OverviewPage::updateAlerts().

+ Here is the caller graph for this function:

string mastercore::getPropertyName ( unsigned int  propertyId)

Definition at line 278 of file mastercore_sp.cpp.

References _my_sps, CMPSPInfo::getSP(), and CMPSPInfo::Entry::name.

Referenced by BalancesView::BalancesView(), MatrixModel::fillin(), SendMPDialog::SendMPDialog(), SendMPDialog::sendMPTransaction(), and OverviewPage::setBalance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CMPTally * mastercore::getTally ( const string &  address)

Definition at line 425 of file mastercore.cpp.

References LOCK, and mp_tally_map.

Referenced by getallbalancesforaddress_MP().

+ Here is the caller graph for this function:

int64_t mastercore::getTotalTokens ( unsigned int  propertyId,
int64_t *  n_owners_total = NULL 
)

Definition at line 646 of file mastercore.cpp.

References _my_sps, ACCEPT_RESERVE, BALANCE, CMPSPInfo::Entry::fixed, getMPbalance(), CMPSPInfo::getSP(), LOCK, METADEX_RESERVE, mp_tally_map, and SELLOFFER_RESERVE.

Referenced by getcrowdsale_MP(), getgrants_MP(), getproperty_MP(), CMPTransaction::logicMath_SendToOwners(), CMPTransaction::logicMath_SimpleSend(), and populateRPCTransactionObject().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::getValidMPTX ( const uint256 txid,
int block = NULL,
unsigned int type = NULL,
uint64_t *  nAmended = NULL 
)

Definition at line 3913 of file mastercore.cpp.

References atoi(), CMPTxList::getTX(), p_txlistdb, and CMPTxList::printStats().

Referenced by populateRPCTransactionObject().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool mastercore::isBigEndian ( )
static

Definition at line 10 of file mastercore_convert.cpp.

Referenced by swapByteOrder16(), swapByteOrder32(), and swapByteOrder64().

+ Here is the caller graph for this function:

bool mastercore::isCrowdsaleActive ( unsigned int  propertyId)

Definition at line 285 of file mastercore_sp.cpp.

References CMPCrowd::getPropertyId(), and my_crowds.

Referenced by getcrowdsale_MP().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::isCrowdsalePurchase ( uint256  txid,
string  address,
int64_t *  propertyId = NULL,
int64_t *  userTokens = NULL,
int64_t *  issuerTokens = NULL 
)

Definition at line 391 of file mastercore_sp.cpp.

References _my_sps, getCrowd(), CMPCrowd::getDatabase(), base_uint< BITS >::GetHex(), CMPCrowd::getPropertyId(), CMPSPInfo::getSP(), CMPSPInfo::Entry::historicalData, CMPSPInfo::Entry::issuer, CMPSPInfo::peekNextSPID(), and TEST_ECO_PROPERTY_1.

Referenced by populateRPCTransactionObject().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::isMainEcosystemProperty ( unsigned int  property)

Definition at line 502 of file mastercore.cpp.

References isTestEcosystemProperty(), and OMNI_PROPERTY_BTC.

+ Here is the call graph for this function:

bool mastercore::isMetaDExOfferActive ( const uint256  txid,
unsigned int  propertyId 
)

Definition at line 509 of file mastercore.cpp.

References CMPMetaDEx::getHash(), base_uint< BITS >::GetHex(), and metadex.

Referenced by gettrade_MP().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::isMPinBlockRange ( int  starting_block,
int  ending_block,
bool  bDeleteFound 
)

Definition at line 3897 of file mastercore.cpp.

References GetHeight(), CMPTxList::isMPinBlockRange(), and p_txlistdb.

Referenced by mscrpc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::isPropertyDivisible ( unsigned int  propertyId)

Definition at line 268 of file mastercore_sp.cpp.

References _my_sps, CMPSPInfo::getSP(), and CMPSPInfo::Entry::isDivisible().

Referenced by MatrixModel::fillin(), FormatMP(), CMPTradeList::getMatchingTrades(), CMPSTOList::getRecipients(), CMPTransaction::logicMath_SimpleSend(), mscrpc(), populateRPCTransactionObject(), SendMPDialog::SendMPDialog(), SendMPDialog::sendMPTransaction(), OverviewPage::setBalance(), SendMPDialog::updateBalances(), and SendMPDialog::updateProperty().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::isTestEcosystemProperty ( unsigned int  property)

Definition at line 495 of file mastercore.cpp.

References OMNI_PROPERTY_TMSC, and TEST_ECO_PROPERTY_1.

Referenced by isMainEcosystemProperty(), isTransactionTypeAllowed(), CMPTransaction::logicMath_MetaDEx(), CMPTransaction::logicMath_SendToOwners(), and MetaDexObjectToJSON().

+ Here is the caller graph for this function:

bool mastercore::isTransactionTypeAllowed ( int  txBlock,
unsigned int  txProperty,
unsigned int  txType,
unsigned short  version,
bool  bAllowNullProperty = false 
)

Definition at line 859 of file mastercore.cpp.

References isNonMainNet(), isTestEcosystemProperty(), OMNI_PROPERTY_BTC, and txRestrictionsRules.

Referenced by checkExpiredAlerts(), CMPTransaction::logicMath_ChangeIssuer(), CMPTransaction::logicMath_GrantTokens(), CMPTransaction::logicMath_MetaDEx(), CMPTransaction::logicMath_RevokeTokens(), CMPTransaction::logicMath_SendToOwners(), CMPTransaction::logicMath_SimpleSend(), CMPTransaction::logicMath_TradeOffer(), and CMPTransaction::step2_SmartProperty().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::MetaDEx_ADD ( const string &  sender_addr,
unsigned int  prop,
uint64_t  amount,
int  block,
unsigned int  property_desired,
uint64_t  amount_desired,
const uint256 txid,
unsigned int  idx 
)

Definition at line 749 of file mastercore_dex.cpp.

References CMPTransaction::ADD, BALANCE, DISPLAY_PRECISION_LEN, CMPMetaDEx::effectivePrice(), get_Indexes(), get_Prices(), CMPMetaDEx::getAmountForSale(), metadex, MetaDEx_debug_print(), METADEX_ERROR, METADEX_RESERVE, OMNI_PROPERTY_MSC, OMNI_PROPERTY_TMSC, PriceCheck(), CMPMetaDEx::ToString(), update_tally_map(), and x_Trade().

Referenced by CMPTransaction::logicMath_MetaDEx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::MetaDEx_CANCEL_ALL_FOR_PAIR ( const uint256  txid,
unsigned int  block,
const string &  sender_addr,
unsigned int  prop,
unsigned int  property_desired 
)

Definition at line 902 of file mastercore_dex.cpp.

References BALANCE, get_Prices(), CMPMetaDEx::getAddr(), CMPMetaDEx::getAmountForSale(), CMPMetaDEx::getDesProperty(), CMPMetaDEx::getHash(), CMPMetaDEx::getProperty(), MetaDEx_debug_print(), METADEX_ERROR, METADEX_RESERVE, p_txlistdb, CMPTxList::recordMetaDExCancelTX(), CMPMetaDEx::ToString(), and update_tally_map().

Referenced by CMPTransaction::logicMath_MetaDEx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::MetaDEx_CANCEL_AT_PRICE ( const uint256  txid,
unsigned int  block,
const string &  sender_addr,
unsigned int  prop,
uint64_t  amount,
unsigned int  property_desired,
uint64_t  amount_desired 
)

Definition at line 844 of file mastercore_dex.cpp.

References BALANCE, CMPTransaction::CANCEL_AT_PRICE, CMPMetaDEx::effectivePrice(), get_Prices(), CMPMetaDEx::getAddr(), CMPMetaDEx::getAmountForSale(), CMPMetaDEx::getDesProperty(), CMPMetaDEx::getHash(), CMPMetaDEx::getProperty(), MetaDEx_debug_print(), METADEX_ERROR, METADEX_RESERVE, p_txlistdb, CMPTxList::recordMetaDExCancelTX(), CMPMetaDEx::ToString(), and update_tally_map().

Referenced by CMPTransaction::logicMath_MetaDEx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::MetaDEx_CANCEL_EVERYTHING ( const uint256  txid,
unsigned int  block,
const string &  sender_addr 
)

Definition at line 956 of file mastercore_dex.cpp.

References BALANCE, DISPLAY_PRECISION_LEN, metadex, MetaDEx_debug_print(), METADEX_ERROR, METADEX_RESERVE, p_txlistdb, CMPTxList::recordMetaDExCancelTX(), and update_tally_map().

Referenced by CMPTransaction::logicMath_MetaDEx().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mastercore::MetaDEx_debug_print ( bool  bShowPriceLevel = false,
bool  bDisplay = false 
)

Definition at line 327 of file mastercore_dex.cpp.

References DISPLAY_PRECISION_LEN, metadex, and CMPMetaDEx::ToString().

Referenced by MetaDEx_ADD(), MetaDEx_CANCEL_ALL_FOR_PAIR(), MetaDEx_CANCEL_AT_PRICE(), MetaDEx_CANCEL_EVERYTHING(), and mscrpc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint64_t mastercore::rounduint64 ( long  double)

Converts numbers to 64 bit wide unsigned integer whereby any signedness is ignored.

If absolute value of the number is greater or equal than .5, then the result is rounded up and down otherwise.

Definition at line 21 of file mastercore_convert.cpp.

Referenced by calculate_and_update_devmsc(), DEx_offerCreate(), DEx_payment(), and getactivedexsells_MP().

+ Here is the caller graph for this function:

uint256 mastercore::send_INTERNAL_1packet ( const string &  FromAddress,
const string &  ToAddress,
const string &  RedeemAddress,
unsigned int  PropertyID,
uint64_t  Amount,
unsigned int  PropertyID_2,
uint64_t  Amount_2,
unsigned int  TransactionType,
int64_t  additional,
int error_code = NULL 
)

Definition at line 2918 of file mastercore.cpp.

References BALANCE, CMPTransaction::CANCEL_ALL_FOR_PAIR, CMPTransaction::CANCEL_AT_PRICE, CMPTransaction::CANCEL_EVERYTHING, ClassB_send(), Checkpoints::data, getMPbalance(), getUserAvailableMPbalance(), isRangeOK(), LogPrintf, MP_INPUT_NOT_IN_RANGE, MP_INSUF_FUNDS_APENDI, MP_INSUF_FUNDS_BPENDI, MSC_TYPE_METADEX, pendingAdd(), PUSH_BACK_BYTES, swapByteOrder32(), and swapByteOrder64().

Referenced by send_MP(), SendMPDialog::sendMPTransaction(), and sendtoowners_MP().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mastercore::set_wallet_totals ( )

Definition at line 943 of file mastercore.cpp.

References _my_sps, ACCEPT_RESERVE, getMPbalance(), getUserAvailableMPbalance(), global_balance_money_maineco, global_balance_money_testeco, global_balance_reserved_maineco, global_balance_reserved_testeco, IsMyAddress(), METADEX_RESERVE, mp_tally_map, CMPSPInfo::peekNextSPID(), SELLOFFER_RESERVE, and TEST_ECO_PROPERTY_1.

Referenced by BalancesView::BalancesView(), MatrixModel::fillin(), mastercore_handler_block_end(), SendMPDialog::sendMPTransaction(), OverviewPage::setBalance(), SendMPDialog::updateFrom(), and SendMPDialog::updateProperty().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string mastercore::strMPProperty ( unsigned int  i)

Definition at line 298 of file mastercore.cpp.

References OMNI_PROPERTY_BTC, OMNI_PROPERTY_MSC, OMNI_PROPERTY_TMSC, and strprintf.

Referenced by CMPTransaction::logicMath_MetaDEx(), CMPTransaction::logicMath_SendToOwners(), CMPTransaction::step2_SmartProperty(), CMPTransaction::step2_Value(), and CMPTransaction::step3_sp_variable().

+ Here is the caller graph for this function:

int64_t mastercore::StrToInt64 ( const std::string &  str,
bool  divisible 
)

Definition at line 11 of file mastercore_parse_string.cpp.

Referenced by send_MP(), SendMPDialog::sendMPTransaction(), sendrawtx_MP(), and sendtoowners_MP().

+ Here is the caller graph for this function:

void mastercore::swapByteOrder16 ( uint16_t &  )

Swaps byte order on little-endian systems and does nothing otherwise.

swapByteOrder cycles on LE systems.

Definition at line 26 of file mastercore_convert.cpp.

References isBigEndian().

Referenced by CMPTransaction::step1(), and CMPTransaction::step2_SmartProperty().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mastercore::swapByteOrder32 ( uint32_t &  ui)

Definition at line 34 of file mastercore_convert.cpp.

References isBigEndian().

Referenced by CMPTransaction::interpretPacket(), CMPTransaction::logicMath_MetaDEx(), send_INTERNAL_1packet(), CMPTransaction::step1(), CMPTransaction::step2_SmartProperty(), CMPTransaction::step2_Value(), and CMPTransaction::step3_sp_variable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mastercore::swapByteOrder64 ( uint64_t &  ull)

Definition at line 44 of file mastercore_convert.cpp.

References isBigEndian().

Referenced by CMPTransaction::logicMath_MetaDEx(), CMPTransaction::logicMath_TradeOffer(), send_INTERNAL_1packet(), CMPTransaction::step2_Value(), CMPTransaction::step3_sp_fixed(), and CMPTransaction::step3_sp_variable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mastercore::update_tally_map ( string  who,
unsigned int  which_currency,
int64_t  amount,
TallyType  ttype 
)

Variable Documentation

CMPSPInfo * mastercore::_my_sps
md_PropertiesMap mastercore::metadex
std::map< string, CMPTally > mastercore::mp_tally_map
AcceptMap mastercore::my_accepts
CrowdMap mastercore::my_crowds
OfferMap mastercore::my_offers
CMPTxList * mastercore::p_txlistdb
CMPSTOList * mastercore::s_stolistdb
CMPTradeList * mastercore::t_tradelistdb