Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
Classes | |
class | MetaDEx_compare |
Typedefs | |
typedef std::map< uint256, CMPPending > | PendingMap |
typedef std::map< string, CMPOffer > | OfferMap |
typedef std::map< string, CMPAccept > | AcceptMap |
typedef std::pair< uint64_t, uint64_t > | MetaDExTypePrice |
typedef std::set< CMPMetaDEx, MetaDEx_compare > | md_Set |
typedef std::map< XDOUBLE, md_Set > | md_PricesMap |
typedef std::map< unsigned int, md_PricesMap > | md_PropertiesMap |
typedef std::map< string, CMPCrowd > | CrowdMap |
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) |
CMPTally * | getTally (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) |
CMPOffer * | DEx_getOffer (const string &seller_addr, unsigned int) |
CMPAccept * | DEx_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_PricesMap * | get_Prices (unsigned int prop) |
md_Set * | get_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) |
CMPCrowd * | getCrowd (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, CMPTally > | mp_tally_map |
CMPTxList * | p_txlistdb |
CMPTradeList * | t_tradelistdb |
CMPSTOList * | s_stolistdb |
OfferMap | my_offers |
AcceptMap | my_accepts |
md_PropertiesMap | metadex |
CMPSPInfo * | _my_sps |
CrowdMap | my_crowds |
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.
typedef std::set< CMPMetaDEx , MetaDEx_compare > mastercore::md_Set |
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.
typedef std::map<uint256, CMPPending> mastercore::PendingMap |
Definition at line 509 of file mastercore.h.
char * mastercore::c_strMasterProtocolTXType | ( | int | i | ) |
Definition at line 732 of file mastercore_tx.cpp.
References MSC_TYPE_ACCEPT_OFFER_BTC, MSC_TYPE_AUTOMATIC_DISPENSARY, MSC_TYPE_CHANGE_ISSUER_ADDRESS, MSC_TYPE_CLOSE_CROWDSALE, MSC_TYPE_CREATE_PROPERTY_FIXED, MSC_TYPE_CREATE_PROPERTY_MANUAL, MSC_TYPE_CREATE_PROPERTY_VARIABLE, MSC_TYPE_GRANT_PROPERTY_TOKENS, MSC_TYPE_METADEX, MSC_TYPE_NOTIFICATION, MSC_TYPE_PROMOTE_PROPERTY, MSC_TYPE_RATELIMITED_MARK, MSC_TYPE_RESTRICTED_SEND, MSC_TYPE_REVOKE_PROPERTY_TOKENS, MSC_TYPE_SAVINGS_COMPROMISED, MSC_TYPE_SAVINGS_MARK, MSC_TYPE_SEND_TO_OWNERS, MSC_TYPE_SIMPLE_SEND, MSC_TYPE_TRADE_OFFER, and OMNICORE_MESSAGE_TYPE_ALERT.
Referenced by CMPTransaction::getTypeString(), and CMPTransaction::step1().
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().
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().
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().
int mastercore::ClassB_send | ( | const string & | senderAddress, |
const string & | receiverAddress, | ||
const string & | redemptionAddress, | ||
const vector< unsigned char > & | data, | ||
uint256 & | txid, | ||
int64_t | additional = 0 |
||
) |
Definition at line 2743 of file mastercore.cpp.
References CPubKey::begin(), CDataStream::begin(), bRawTX, CWallet::CommitTransaction(), CWallet::CreateTransaction(), CWallet::cs_wallet, CCoinControl::destChange, CPubKey::end(), CDataStream::end(), exodus_address, CBitcoinAddress::Get(), GetDustLimit(), CTransaction::GetHash(), CBitcoinAddress::GetKeyID(), CCryptoKeyStore::GetPubKey(), GetRand(), CCoinControl::HasSelected(), HexStr(), CPubKey::IsFullyValid(), CBitcoinAddress::IsScript(), CBitcoinAddress::IsValid(), LOCK, MAX_SHA256_OBFUSCATION_TIMES, MP_ERR_COMMIT_TX, MP_ERR_CREATE_TX, MP_ERR_INPUTSELECT_FAIL, MP_ERR_WALLET_ACCESS, MP_INPUTS_INVALID, MP_REDEMP_BAD_KEYID, MP_REDEMP_BAD_VALIDATION, MP_REDEMP_FETCH_ERR_PUBKEY, MP_REDEMP_ILLEGAL, MP_REDEMP_INVALID_PUBKEY, PACKET_SIZE, ParseHex(), prepareObfuscatedHashes(), PROTOCOL_VERSION, pwalletMain, selectCoins(), SER_NETWORK, CScript::SetDestination(), CScript::SetMultisig(), CBase58Data::SetString(), and CTransaction::ToString().
Referenced by send_INTERNAL_1packet(), and sendrawtx_MP().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
std::string mastercore::getMasterCoreAlertString | ( | ) |
Definition at line 530 of file mastercore.cpp.
References global_alert_message.
Referenced by getinfo_MP(), and OverviewPage::updateAlerts().
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().
CMPTally * mastercore::getTally | ( | const string & | address | ) |
Definition at line 425 of file mastercore.cpp.
References LOCK, and mp_tally_map.
Referenced by getallbalancesforaddress_MP().
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().
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().
|
static |
Definition at line 10 of file mastercore_convert.cpp.
Referenced by swapByteOrder16(), swapByteOrder32(), and swapByteOrder64().
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().
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().
bool mastercore::isMainEcosystemProperty | ( | unsigned int | property | ) |
Definition at line 502 of file mastercore.cpp.
References isTestEcosystemProperty(), and OMNI_PROPERTY_BTC.
Definition at line 509 of file mastercore.cpp.
References CMPMetaDEx::getHash(), base_uint< BITS >::GetHex(), and metadex.
Referenced by gettrade_MP().
Definition at line 3897 of file mastercore.cpp.
References GetHeight(), CMPTxList::isMPinBlockRange(), and p_txlistdb.
Referenced by mscrpc().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
bool mastercore::update_tally_map | ( | string | who, |
unsigned int | which_currency, | ||
int64_t | amount, | ||
TallyType | ttype | ||
) |
Definition at line 687 of file mastercore.cpp.
References exodus_address, getMPbalance(), LOCK, mp_tally_map, msc_debug_exo, and CMPTally::updateMoney().
Referenced by calculate_and_update_devmsc(), DEx_acceptCreate(), DEx_acceptDestroy(), DEx_offerCreate(), DEx_offerDestroy(), DEx_payment(), eraseExpiredCrowdsale(), input_msc_balances_string(), CMPTransaction::interpretPacket(), CMPTransaction::logicMath_GrantTokens(), CMPTransaction::logicMath_RevokeTokens(), CMPTransaction::logicMath_SendToOwners(), CMPTransaction::logicMath_SimpleSend(), mastercore_init(), MetaDEx_ADD(), MetaDEx_CANCEL_ALL_FOR_PAIR(), MetaDEx_CANCEL_AT_PRICE(), MetaDEx_CANCEL_EVERYTHING(), pendingAdd(), pendingDelete(), TXExodusFundraiser(), and x_Trade().
CMPSPInfo * mastercore::_my_sps |
Definition at line 362 of file mastercore.cpp.
Referenced by check_prop_valid(), clear_all_state(), eraseExpiredCrowdsale(), eraseMaxedCrowdsale(), getactivecrowdsales_MP(), getallbalancesforid_MP(), getbalance_MP(), getcrowdsale_MP(), getgrants_MP(), getproperty_MP(), getPropertyName(), getTotalTokens(), input_globals_state_string(), CMPTransaction::interpretPacket(), isCrowdsalePurchase(), isPropertyDivisible(), listproperties_MP(), load_most_relevant_state(), CMPTransaction::logicMath_ChangeIssuer(), CMPTransaction::logicMath_GrantTokens(), CMPTransaction::logicMath_MetaDEx(), CMPTransaction::logicMath_RevokeTokens(), CMPTransaction::logicMath_SimpleSend(), mastercore_init(), mastercore_save_state(), mastercore_shutdown(), MetaDexObjectToJSON(), mscrpc(), populateRPCTransactionObject(), send_MP(), sendtoowners_MP(), set_wallet_totals(), CMPTransaction::step2_SmartProperty(), and write_globals_state().
md_PropertiesMap mastercore::metadex |
Definition at line 63 of file mastercore_dex.cpp.
Referenced by get_Prices(), input_mp_offers_string(), isMetaDExOfferActive(), MetaDEx_ADD(), MetaDEx_CANCEL_EVERYTHING(), MetaDEx_debug_print(), msc_file_load(), and write_mp_metadex().
std::map< string, CMPTally > mastercore::mp_tally_map |
Definition at line 423 of file mastercore.cpp.
Referenced by clear_all_state(), MatrixModel::fillin(), getallbalancesforid_MP(), getMPbalance(), getTally(), getTotalTokens(), CMPTransaction::logicMath_SendToOwners(), msc_file_load(), msc_initial_scan(), mscrpc(), set_wallet_totals(), update_tally_map(), SendMPDialog::updateProperty(), and write_msc_balances().
AcceptMap mastercore::my_accepts |
Definition at line 360 of file mastercore.cpp.
Referenced by clear_all_state(), DEx_acceptCreate(), DEx_acceptDestroy(), DEx_getAccept(), eraseExpiredAccepts(), getactivedexsells_MP(), input_mp_accepts_string(), msc_file_load(), and write_mp_accepts().
CrowdMap mastercore::my_crowds |
Definition at line 363 of file mastercore.cpp.
Referenced by clear_all_state(), eraseExpiredCrowdsale(), eraseMaxedCrowdsale(), getactivecrowdsales_MP(), getCrowd(), getcrowdsale_MP(), input_mp_crowdsale_string(), CMPTransaction::interpretPacket(), isCrowdsaleActive(), msc_file_load(), mscrpc(), and write_mp_crowdsales().
OfferMap mastercore::my_offers |
Definition at line 359 of file mastercore.cpp.
Referenced by clear_all_state(), DEx_acceptCreate(), DEx_getOffer(), DEx_offerCreate(), DEx_offerDestroy(), DEx_offerExists(), getactivedexsells_MP(), input_mp_offers_string(), msc_file_load(), and write_mp_offers().
CMPTxList * mastercore::p_txlistdb |
Definition at line 155 of file mastercore.cpp.
Referenced by DEx_payment(), getinfo_MP(), gettrade_MP(), getValidMPTX(), isMPinBlockRange(), listblocktransactions_MP(), mastercore_handler_block_begin(), mastercore_handler_tx(), mastercore_init(), mastercore_shutdown(), MetaDEx_CANCEL_ALL_FOR_PAIR(), MetaDEx_CANCEL_AT_PRICE(), MetaDEx_CANCEL_EVERYTHING(), mscrpc(), populateRPCTransactionObject(), CMPTxList::recordPaymentTX(), and CMPTxList::recordTX().
CMPSTOList * mastercore::s_stolistdb |
Definition at line 157 of file mastercore.cpp.
Referenced by getsto_MP(), listtransactions_MP(), CMPTransaction::logicMath_SendToOwners(), mastercore_handler_block_begin(), mastercore_init(), mastercore_shutdown(), mscrpc(), and CMPSTOList::recordSTOReceive().
CMPTradeList * mastercore::t_tradelistdb |
Definition at line 156 of file mastercore.cpp.
Referenced by getinfo_MP(), gettrade_MP(), mastercore_handler_block_begin(), mastercore_init(), mastercore_shutdown(), mscrpc(), and x_Trade().