Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.9 UI #243

Merged
merged 166 commits into from
Feb 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
26dd2c8
fix version
zathras-crypto Oct 3, 2014
886accb
SP UI start to 0.0.9
zathras-crypto Oct 13, 2014
c09e4d1
Merge branch '0.0.9-Z-UIAlpha' of github.com:zathras-crypto/mastercor…
zathras-crypto Oct 13, 2014
10c16eb
Start of Exchange UI
zathras-crypto Oct 13, 2014
d278a20
Exchange tabs and actions
zathras-crypto Oct 13, 2014
7207a75
Clean up
zathras-crypto Oct 14, 2014
52d10c2
Initial stab at metadex form
zathras-crypto Oct 14, 2014
c1bcfe8
MetaDEx base form UI
zathras-crypto Oct 14, 2014
1fe45ef
More MetaDEx UI stuff
zathras-crypto Oct 14, 2014
7456554
Initial form updates init
zathras-crypto Oct 14, 2014
822176f
Further stuff for MetaDEx UI
zathras-crypto Oct 14, 2014
be37593
More MetaDEX UI stuff
zathras-crypto Oct 14, 2014
2c73268
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Oct 16, 2014
5da8721
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Oct 16, 2014
9b8fb1c
Various fixes from 0.0.8 + More MetaDEx
zathras-crypto Oct 16, 2014
270e6d7
strToInt64 fix and more metadex
zathras-crypto Oct 16, 2014
03adf6a
More work on sending trades in metadex UI
zathras-crypto Oct 17, 2014
5198301
Minor fixes
zathras-crypto Oct 17, 2014
14acd11
Add a forced UI refresh every 10 secs
zathras-crypto Oct 17, 2014
109686a
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Oct 28, 2014
e14bfc0
metadex updates
zathras-crypto Oct 28, 2014
fb7ed6a
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Oct 28, 2014
979b254
more metadex work
zathras-crypto Oct 29, 2014
80466b4
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Oct 29, 2014
d156fc3
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Oct 31, 2014
b706707
Fixing up with latest
zathras-crypto Oct 31, 2014
d0f4eda
MetaDEx UI work
zathras-crypto Oct 31, 2014
4b8b5d4
Refresh metadex UI, swap buy/sell books and label
zathras-crypto Nov 4, 2014
c5e5e76
Add clickable offers
zathras-crypto Nov 4, 2014
8d97e2e
Make order books non-editable
zathras-crypto Nov 4, 2014
9114501
Change forced refresh to 60 secs, balance/block triggers should refresh
zathras-crypto Nov 4, 2014
1881776
Flag own orders (or partof) with bold in orderbook
zathras-crypto Nov 4, 2014
5118474
Remove debugging printfs
zathras-crypto Nov 4, 2014
f854896
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 4, 2014
b1a451e
Fix renames
zathras-crypto Nov 4, 2014
07caf57
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 7, 2014
9a20d09
Fix namespace ordering
zathras-crypto Nov 10, 2014
cf3f04c
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 10, 2014
6916aa9
Tab out transaction history and add utility page
zathras-crypto Nov 10, 2014
7df633e
Rename to toolbox, add icon and fix up
zathras-crypto Nov 10, 2014
fdf7a47
Add order history initials
zathras-crypto Nov 11, 2014
5dcfb19
missing files for orderHistoryDialog
zathras-crypto Nov 11, 2014
9591a7e
initials for orderListDelegate
zathras-crypto Nov 11, 2014
426076c
Correct tabs
zathras-crypto Nov 11, 2014
2cd3dfd
Adding listdelegate for formatting of history
zathras-crypto Nov 11, 2014
2922206
Further work for order history
zathras-crypto Nov 11, 2014
a840262
more work on order history retrieval
zathras-crypto Nov 11, 2014
a7fbf54
Further work on order history for UI
zathras-crypto Nov 11, 2014
5d6cddd
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 11, 2014
6ccf490
icons for metadex order history
zathras-crypto Nov 11, 2014
ae2d2af
Broken
zathras-crypto Nov 11, 2014
3313de9
Commit before branch retest
zathras-crypto Nov 11, 2014
8bebf3f
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 11, 2014
e99e093
More order history changes
zathras-crypto Nov 12, 2014
8db5b45
More working order history
zathras-crypto Nov 12, 2014
f73542e
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 12, 2014
60c46ed
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 12, 2014
6eaf893
Minor formatting changes
zathras-crypto Nov 13, 2014
2db8469
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Nov 26, 2014
55980ff
Fix broken alerts
zathras-crypto Nov 27, 2014
f808524
Add address search to toolbox
zathras-crypto Nov 27, 2014
b84ae1a
Updates to toolbox
zathras-crypto Nov 27, 2014
9b6e3df
Add free text search to property lookup
zathras-crypto Nov 27, 2014
4bbc1b9
fix up property lookup
zathras-crypto Nov 27, 2014
5438044
Add UI elements for tx history
zathras-crypto Nov 27, 2014
0c342e0
enable the tx history tab
zathras-crypto Nov 27, 2014
6c226d4
Updates to transaction history
zathras-crypto Nov 28, 2014
6f18aeb
latest changes to txhistory
zathras-crypto Nov 28, 2014
39db7c0
Fix decimals and direction
zathras-crypto Nov 28, 2014
053cc91
Redo transaction history in to let QT do more of the work
zathras-crypto Nov 30, 2014
ee2e5b8
Add right click contextual menu to tx history
zathras-crypto Nov 30, 2014
1c3ded5
Fix copy handlers and add invisible txid
zathras-crypto Nov 30, 2014
f5f206e
Completing tx history
zathras-crypto Nov 30, 2014
3104585
Missing new mastercore_rpc.h file
zathras-crypto Nov 30, 2014
d2ca9e9
Fix addresses and send/receive verbage
zathras-crypto Nov 30, 2014
eb44dfb
Fix double click on tx history and clean up a bit
zathras-crypto Nov 30, 2014
d778f80
Rename OK to Close in tx dialog and clean up more
zathras-crypto Nov 30, 2014
ae66f65
Add limit of 50 historical transactions as unsure of performance
zathras-crypto Nov 30, 2014
8f0a703
fix build errors
zathras-crypto Nov 30, 2014
f877b90
Add QR support to address lookup in toolbox
zathras-crypto Nov 30, 2014
20108cf
Add tx lookup to toolbox
zathras-crypto Nov 30, 2014
a263a5d
More work on history and pending txs
zathras-crypto Dec 1, 2014
d74236a
Some corrections to pending txs in history
zathras-crypto Dec 1, 2014
3375e0f
Update on block changes and disable update timer
zathras-crypto Dec 1, 2014
f2e33ff
Add FormatDivisibleShortMP for UI usage
zathras-crypto Dec 1, 2014
23e9cb9
Move order history away from custom list delegate to standard UI elem…
zathras-crypto Dec 1, 2014
09391d6
Remove delegate stuff
zathras-crypto Dec 1, 2014
47bac90
Fix icons and decolor unmatched trades
zathras-crypto Dec 1, 2014
b816c65
Initial UI support for MetaDEx cancels
zathras-crypto Dec 2, 2014
b70c702
Update history with signal
zathras-crypto Dec 2, 2014
f7a597a
Right click handler for trade history
zathras-crypto Dec 2, 2014
3501df6
Fix models
zathras-crypto Dec 2, 2014
1688308
Fix verbage
zathras-crypto Dec 2, 2014
11ae016
Order display
zathras-crypto Dec 2, 2014
7bdce1e
add matches to trade info
zathras-crypto Dec 2, 2014
a5d4dce
Activate pending label
zathras-crypto Dec 2, 2014
fc01eac
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Dec 2, 2014
cbee350
Metadex form changes
zathras-crypto Dec 2, 2014
d74b224
Fix prop name display on metadex form
zathras-crypto Dec 2, 2014
b47af52
Fix for prices
zathras-crypto Dec 2, 2014
e6a533d
Fix alignment
zathras-crypto Dec 4, 2014
9f12a80
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Dec 4, 2014
8f7ad01
Add --startclean option to delete persistence
zathras-crypto Dec 4, 2014
ed1274f
Add stolistdb for levelDB storage of STO receipts
zathras-crypto Dec 4, 2014
7f1c3ae
add RecordSTOReceive function to CMPSTOList class
zathras-crypto Dec 4, 2014
ac7925b
Add recording of STO receipt
zathras-crypto Dec 4, 2014
78383ba
Add getsto_MP RPC call
zathras-crypto Dec 5, 2014
42c6838
Code up getsto_MP RPC call
zathras-crypto Dec 5, 2014
1f733b5
Prep getRecipients function
zathras-crypto Dec 5, 2014
02453df
Coding out getRecipients function for sdb
zathras-crypto Dec 5, 2014
97fe01b
Bug fixes for getsto_MP
zathras-crypto Dec 5, 2014
6c25eb1
Couple minor fixes to startclean
zathras-crypto Dec 5, 2014
cec9d5b
Fix STO deleteafterblock
zathras-crypto Dec 5, 2014
b556bcf
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Dec 8, 2014
d4f4b8b
Disable MetaDEx functionality in UI, next release is STO
zathras-crypto Dec 9, 2014
b82f645
Add getMySTOReceipts function
zathras-crypto Dec 9, 2014
b3b16c5
Fix missing token
zathras-crypto Dec 9, 2014
29c769f
Activate getMySTOReciepts for testing
zathras-crypto Dec 9, 2014
092e570
Change model for getMySTOReceipts
zathras-crypto Dec 9, 2014
e3e2624
support filtering for example from listtransactions_MP
zathras-crypto Dec 9, 2014
4ee090f
Add divisibility to getMySTOReceipts
zathras-crypto Dec 9, 2014
d857b0d
RPC support for STO in listtransactions_MP
zathras-crypto Dec 9, 2014
8750756
Fix crash on exit
zathras-crypto Dec 9, 2014
31e7ee5
Add total to getReceipts
zathras-crypto Dec 9, 2014
aef0c2a
Update method
zathras-crypto Dec 9, 2014
8022e49
Fix up listtransactions_MP support, appears working well now
zathras-crypto Dec 9, 2014
8671472
minor pointer fix
zathras-crypto Dec 9, 2014
ccf6adc
Remove requirement to supply divisibility to getReceipts
zathras-crypto Dec 9, 2014
47ab377
clean up RPC
zathras-crypto Dec 9, 2014
80baf1a
Changes to TX History form to accomodate STO
zathras-crypto Dec 9, 2014
e132534
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Dec 11, 2014
905f783
Increase initial window size
zathras-crypto Dec 11, 2014
22a1d65
Remove metadex files not used in this UI build
zathras-crypto Dec 12, 2014
280357e
Remove additional unused metadex UI components
zathras-crypto Dec 12, 2014
a09bca5
Change versioning to seperate file
zathras-crypto Dec 12, 2014
2ee9140
Further fixes for versioning
zathras-crypto Dec 12, 2014
7e5e95e
Fix UI history SP# display for 'Create Property' types
zathras-crypto Dec 13, 2014
c7710f9
Change the way locks are used to avoid hangs waiting for locks
zathras-crypto Dec 13, 2014
c135ec9
Redo transaction history page to correct a bunch of bugs
zathras-crypto Dec 14, 2014
7c85792
Fix duplicate element name
zathras-crypto Dec 14, 2014
75dfd85
Fix bad zorder attributes in lookupspdialog UI form
zathras-crypto Dec 14, 2014
60693f7
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Dec 15, 2014
186e76e
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Dec 16, 2014
2b1010f
Pull UI branch upto latest 9 code & fix various merge conflicts etc
zathras-crypto Feb 1, 2015
ff6541b
Merge branch 'mscore-0.0.9' of github.com:mastercoin-MSC/mastercore i…
zathras-crypto Feb 3, 2015
a4518e4
Fix error relating to obtaining STO recipients from UI
zathras-crypto Feb 4, 2015
6c97976
Redo splash screens to reflect new branding
zathras-crypto Feb 4, 2015
baae998
Redo splashscreen CPP to adjust layout to new splash
zathras-crypto Feb 4, 2015
748946b
Fix bad version display due to float
zathras-crypto Feb 4, 2015
832eca1
Change copyright year
zathras-crypto Feb 4, 2015
93c47da
Update Omni labels
zathras-crypto Feb 5, 2015
9613fdb
Add missing breaks as noticed by DexX
zathras-crypto Feb 5, 2015
b9e03c0
Change wording to more accurately msg on tx lookup
zathras-crypto Feb 5, 2015
5d7301b
Fix ecosystem display on property lookup
zathras-crypto Feb 6, 2015
e676287
Remove duplicate getsto_MP entry
zathras-crypto Feb 6, 2015
fd212f3
Remove unneeeded includes after moving to strprintf
zathras-crypto Feb 6, 2015
0998a25
Remove debug line no longer used
zathras-crypto Feb 6, 2015
3d4e4c9
Fix: Missing LOCK of cs_main in selectCoins()
dexX7 Feb 6, 2015
bfb83fe
QT: Remove forceUpdateBalances() in WalletModel()
dexX7 Feb 6, 2015
671e51f
QT: Refine updates of "Send" dialog
dexX7 Feb 6, 2015
86ed32b
QT: In "Overview" unhide "Smart Properties" on update
dexX7 Feb 6, 2015
f30a845
QT: in "Overview" align BTC and MSC amounts
dexX7 Feb 6, 2015
dca2c7a
Merge pull request #13 from dexX7/mcore-0.0.9-zathras-ui-243
zathras-crypto Feb 7, 2015
f2055a2
QT: Guard against setPlaceholderText < QT 4.7
dexX7 Dec 26, 2014
6e55b74
QT: Guard against interface change of QHeaderView
dexX7 Feb 7, 2015
89f63d4
Merge pull request #14 from dexX7/mcore-0.0.9-zathras-ui-guards
zathras-crypto Feb 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
#define COPYRIGHT_YEAR 2014
#define COPYRIGHT_YEAR 2015

#endif //HAVE_CONFIG_H

Expand Down
83 changes: 74 additions & 9 deletions src/mastercore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ static const int nBlockTop = 0;

static int nWaterlineBlock = 0; //

uint64_t global_MSC_total = 0;
uint64_t global_MSC_RESERVED_total = 0;
uint64_t global_metadex_market;
uint64_t global_balance_money_maineco[100000];
uint64_t global_balance_reserved_maineco[100000];
uint64_t global_balance_money_testeco[100000];
Expand Down Expand Up @@ -321,6 +320,27 @@ bool isNonMainNet()
return (TestNet() || RegTest());
}

string FormatPriceMP(double n)
{
string str = strprintf("%lf", n);
// clean up trailing zeros - good for RPC not so much for UI
str.erase ( str.find_last_not_of('0') + 1, std::string::npos );
if (str.length() > 0) { std::string::iterator it = str.end() - 1; if (*it == '.') { str.erase(it); } } //get rid of trailing dot if non decimal
return str;
}

string FormatDivisibleShortMP(int64_t n)
{
int64_t n_abs = (n > 0 ? n : -n);
int64_t quotient = n_abs/COIN;
int64_t remainder = n_abs%COIN;
string str = strprintf("%d.%08d", quotient, remainder);
// clean up trailing zeros - good for RPC not so much for UI
str.erase ( str.find_last_not_of('0') + 1, std::string::npos );
if (str.length() > 0) { std::string::iterator it = str.end() - 1; if (*it == '.') { str.erase(it); } } //get rid of trailing dot if non decimal
return str;
}

// mostly taken from Bitcoin's FormatMoney()
string FormatDivisibleMP(int64_t n, bool fSign)
{
Expand Down Expand Up @@ -362,7 +382,7 @@ AcceptMap mastercore::my_accepts;
CMPSPInfo *mastercore::_my_sps;
CrowdMap mastercore::my_crowds;

static PendingMap my_pending;
PendingMap mastercore::my_pending;

static CMPPending *pendingDelete(const uint256 txid, bool bErase = false)
{
Expand Down Expand Up @@ -399,19 +419,20 @@ static CMPPending *pendingDelete(const uint256 txid, bool bErase = false)
return (CMPPending *) NULL;
}

static int pendingAdd(const uint256 &txid, const string &FromAddress, unsigned int propId, int64_t Amount)
static int pendingAdd(const uint256 &txid, const string &FromAddress, unsigned int propId, int64_t Amount, int64_t type, const string &txDesc)
{
CMPPending pending;

if (msc_debug_verbose3) file_log("%s(%s,%s,%u,%ld), line %d, file: %s\n", __FUNCTION__, txid.GetHex().c_str(), FromAddress.c_str(), propId, Amount, __LINE__, __FILE__);
if (msc_debug_verbose3) file_log("%s(%s,%s,%u,%ld,%d, %s), line %d, file: %s\n", __FUNCTION__, txid.GetHex().c_str(), FromAddress.c_str(), propId, Amount, type, txDesc,__LINE__, __FILE__);

// support for pending, 0-confirm
if (update_tally_map(FromAddress, propId, -Amount, PENDING))
{
pending.src = FromAddress;
pending.amount = Amount;
pending.prop = propId;

pending.desc = txDesc;
pending.type = type;
pending.print(txid);
my_pending.insert(std::make_pair(txid, pending));
}
Expand Down Expand Up @@ -2471,6 +2492,7 @@ int mastercore_init()
printf("Exception deleting folders for --startclean option.\n");
}
}

t_tradelistdb = new CMPTradeList(GetDataDir() / "MP_tradelist", 1<<20, false, fReindex);
s_stolistdb = new CMPSTOList(GetDataDir() / "MP_stolist", 1<<20, false, fReindex);
p_txlistdb = new CMPTxList(GetDataDir() / "MP_txlist", 1<<20, false, fReindex);
Expand Down Expand Up @@ -2692,7 +2714,7 @@ static int64_t selectCoins(const string &FromAddress, CCoinControl &coinControl,
// if referenceamount is set it is needed to be accounted for here too
if (0 < additional) n_max += additional;

LOCK(wallet->cs_wallet);
LOCK2(cs_main, wallet->cs_wallet);

string sAddress = "";

Expand Down Expand Up @@ -2988,6 +3010,11 @@ const unsigned int prop = PropertyID;
return 0;
}

int64_t rawTransactionType = TransactionType;
int64_t rawPropertyID = PropertyID;
int64_t rawPropertyID_2 = PropertyID_2;
int64_t rawAmount = Amount;
int64_t rawAmount_2 = Amount_2;
vector<unsigned char> data;
swapByteOrder32(TransactionType);
swapByteOrder32(PropertyID);
Expand Down Expand Up @@ -3019,7 +3046,46 @@ const unsigned int prop = PropertyID;

if (0 == rc)
{
(void) pendingAdd(txid, FromAddress, prop, amount);
// only simple sends and metadex pending needed at moment
Object txobj;
txobj.push_back(Pair("txid", txid.GetHex()));
txobj.push_back(Pair("sendingaddress", FromAddress));
if (rawTransactionType == MSC_TYPE_SIMPLE_SEND) txobj.push_back(Pair("referenceaddress", ToAddress));
txobj.push_back(Pair("confirmations", 0));
// txobj->push_back(Pair("fee", ValueFromAmount(nFee)));
txobj.push_back(Pair("version", (int64_t)0)); //we only send v0 currently so all pending v0
txobj.push_back(Pair("type_int", (int64_t)rawTransactionType));
bool divisible = false;
bool desiredDivisible = false;
string amountStr;
string amountDStr;
switch (rawTransactionType)
{
case 0: //simple send
txobj.push_back(Pair("type", "Simple send"));
txobj.push_back(Pair("propertyid", rawPropertyID));
divisible = isPropertyDivisible(rawPropertyID);
txobj.push_back(Pair("divisible", divisible));
if (divisible) { amountStr = FormatDivisibleMP(rawAmount); } else { amountStr = FormatIndivisibleMP(rawAmount); }
txobj.push_back(Pair("amount", amountStr));
break;
case 21: //metadex sell
txobj.push_back(Pair("type", "MetaDEx token trade"));
divisible = isPropertyDivisible(rawPropertyID);
desiredDivisible = isPropertyDivisible(rawPropertyID_2);
if (divisible) { amountStr = FormatDivisibleMP(rawAmount); } else { amountStr = FormatIndivisibleMP(rawAmount); }
if (desiredDivisible) { amountDStr = FormatDivisibleMP(rawAmount_2); } else { amountDStr = FormatIndivisibleMP(rawAmount_2); }
txobj.push_back(Pair("amountoffered", amountStr));
txobj.push_back(Pair("propertyoffered", rawPropertyID));
txobj.push_back(Pair("propertyofferedisdivisible", divisible));
txobj.push_back(Pair("amountdesired", amountDStr));
txobj.push_back(Pair("propertydesired", rawPropertyID_2));
txobj.push_back(Pair("propertydesiredisdivisible", desiredDivisible));
txobj.push_back(Pair("action", additional));
break;
}
string txDesc = write_string(Value(txobj), false);
(void) pendingAdd(txid, FromAddress, prop, amount, rawTransactionType, txDesc);
}

return txid;
Expand Down Expand Up @@ -4413,7 +4479,6 @@ std::string new_global_alert_message;
break;

default:

return (PKT_ERROR -100);
}

Expand Down
18 changes: 14 additions & 4 deletions src/mastercore.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ enum FILETYPES {
#define OMNI_PROPERTY_MSC 1
#define OMNI_PROPERTY_TMSC 2

#include <boost/multiprecision/cpp_dec_float.hpp>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this and the following two lines here? cpp_dec_float_100 and neither XDOUBLE are used in the header, as far as I can see.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh - stretching my memory here but going back to the MetaDEx work I was doing on the UI, MetaDEx UI components include mastercore.h & I needed access to the math (specifically the precision) types we were using for MetaDEx trades so I could ensure the data I was displaying was accurate. IIRC not needed for this build - strip them out you think?

EDIT: Yep, with this commit - zathras-crypto@b47af52#diff-b94cdddc5f85569ab28fdbb5cb702aba - probably getting a little punchy with the includes...

using boost::multiprecision::cpp_dec_float_100;
typedef cpp_dec_float_100 XDOUBLE;

int mp_LogPrintStr(const std::string &str);

/* When we switch to C++11, this can be switched to variadic templates instead
Expand Down Expand Up @@ -175,13 +179,17 @@ TINYFORMAT_FOREACH_ARGNUM(MP_MAKE_ERROR_AND_LOG_FUNC)
//--- CUT HERE ---

// forward declarations
std::string FormatPriceMP(double n);
std::string FormatDivisibleMP(int64_t n, bool fSign = false);
std::string FormatDivisibleShortMP(int64_t);
std::string FormatMP(unsigned int, int64_t n, bool fSign = false);
uint256 send_MP(const string &FromAddress, const string &ToAddress, const string &RedeemAddress, unsigned int PropertyID, uint64_t Amount);
int64_t feeCheck(const string &address);

const std::string ExodusAddress();

extern int msc_debug_ui;

extern CCriticalSection cs_tally;

extern const int msc_debug_dex;
Expand Down Expand Up @@ -468,17 +476,19 @@ class CMPPending
string src; // the FromAddress
unsigned int prop;
int64_t amount;
int64_t type;
string desc; // the description

void print(uint256 txid) const
{
printf("%s : %s %d %ld\n", txid.GetHex().c_str(), src.c_str(), prop, amount);
printf("%s : %s %d %ld %ld %s\n", txid.GetHex().c_str(), src.c_str(), prop, amount, type, desc.c_str());
}

};

extern uint64_t global_MSC_total;
extern uint64_t global_MSC_RESERVED_total;
//temp - only supporting 100,000 properties per eco here, research best way to expand array
//these 4 arrays use about 3MB total memory with 100K properties limit (100000*8*4 bytes)
extern uint64_t global_metadex_market;
extern uint64_t global_balance_money_maineco[100000];
extern uint64_t global_balance_reserved_maineco[100000];
extern uint64_t global_balance_money_testeco[100000];
Expand Down Expand Up @@ -507,7 +517,7 @@ extern CMPTradeList *t_tradelistdb;
extern CMPSTOList *s_stolistdb;

typedef std::map<uint256, CMPPending> PendingMap;

extern PendingMap my_pending;
string strMPProperty(unsigned int i);

int GetHeight(void);
Expand Down
1 change: 1 addition & 0 deletions src/mastercore_dex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ const XDOUBLE desprice = (1/buyersprice); // inverse, to be matched against that

if (msc_debug_metadex1) file_log("==== TRADED !!! %u=%s\n", NewReturn, getTradeReturnType(NewReturn));

// record the trade in MPTradeList
t_tradelistdb->recordTrade(p_older->getHash(), newo->getHash(),
p_older->getAddr(), newo->getAddr(), p_older->getDesProperty(), newo->getDesProperty(), seller_amountGot, buyer_amountGot, newo->getBlock());

Expand Down
2 changes: 1 addition & 1 deletion src/mastercore_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ Value getinfo_MP(const Array& params, bool fHelp)
// other bits of info we want to report should be included here

// provide the mastercore and bitcoin version and if available commit id
infoResponse.push_back(Pair("mastercoreversion", "0.0." + boost::lexical_cast<string>((double)OMNICORE_VERSION_BASE/10) + OMNICORE_VERSION_TYPE ));
infoResponse.push_back(Pair("mastercoreversion", "0.0." + strprintf("%.1f",(double)OMNICORE_VERSION_BASE/10) + OMNICORE_VERSION_TYPE ));
infoResponse.push_back(Pair("bitcoincoreversion", "0." + boost::lexical_cast<string>((int)CLIENT_VERSION/100)));
infoResponse.push_back(Pair("commitinfo", COMMIT_INFO));

Expand Down
26 changes: 26 additions & 0 deletions src/qt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ QT_FORMS_UI = \
forms/sendcoinsdialog.ui \
forms/sendcoinsentry.ui \
forms/sendmpdialog.ui \
forms/txhistorydialog.ui \
forms/lookupspdialog.ui \
forms/lookupaddressdialog.ui \
forms/lookuptxdialog.ui \
forms/signverifymessagedialog.ui \
forms/transactiondescdialog.ui

Expand Down Expand Up @@ -137,6 +141,10 @@ QT_MOC_CPP = \
moc_sendcoinsdialog.cpp \
moc_sendcoinsentry.cpp \
moc_sendmpdialog.cpp \
moc_txhistorydialog.cpp \
moc_lookupspdialog.cpp \
moc_lookupaddressdialog.cpp \
moc_lookuptxdialog.cpp \
moc_signverifymessagedialog.cpp \
moc_splashscreen.cpp \
moc_trafficgraphwidget.cpp \
Expand Down Expand Up @@ -203,6 +211,10 @@ BITCOIN_QT_H = \
sendcoinsdialog.h \
sendcoinsentry.h \
sendmpdialog.h \
txhistorydialog.h \
lookupspdialog.h \
lookupaddressdialog.h \
lookuptxdialog.h \
signverifymessagedialog.h \
splashscreen.h \
trafficgraphwidget.h \
Expand All @@ -221,11 +233,21 @@ BITCOIN_QT_H = \
winshutdownmonitor.h

RES_ICONS = \
res/icons/transaction_invalid.png \
res/icons/mp_exchange.png \
res/icons/mp_toolbox.png \
res/icons/mp_sp.png \
res/icons/mp_balances.png \
res/icons/mp_history.png \
res/icons/mp_home.png \
res/icons/mp_receive.png \
res/icons/mp_send.png \
res/icons/mp_meta_cancelled.png \
res/icons/mp_meta_filled.png \
res/icons/mp_meta_open.png \
res/icons/mp_meta_partialclosed.png \
res/icons/mp_meta_partial.png \
res/icons/mp_meta_pending.png \
res/icons/add.png \
res/icons/address-book.png \
res/icons/bitcoin.ico \
Expand Down Expand Up @@ -310,6 +332,10 @@ BITCOIN_QT_CPP += \
sendcoinsdialog.cpp \
sendcoinsentry.cpp \
sendmpdialog.cpp \
txhistorydialog.cpp \
lookupspdialog.cpp \
lookupaddressdialog.cpp \
lookuptxdialog.cpp \
signverifymessagedialog.cpp \
transactiondesc.cpp \
transactiondescdialog.cpp \
Expand Down
Loading