Get total

This commit is contained in:
jl777
2019-01-18 01:06:25 -11:00
parent 64726e1e21
commit bb41418f23

View File

@@ -977,7 +977,7 @@ UniValue MarmaraPoolPayout(uint64_t txfee,int32_t firstheight,double perc,char *
UniValue MarmaraInfo(CPubKey refpk,int32_t firstheight,int32_t lastheight,int64_t minamount,int64_t maxamount,std::string currency)
{
CMutableTransaction mtx; std::vector<CPubKey> pubkeys;
UniValue result(UniValue::VOBJ),a(UniValue::VARR),b(UniValue::VARR); int32_t i,n,matches; int64_t totalclosed=0,totalamount=0,val; std::vector<uint256> issuances,closed; char coinaddr[64];
UniValue result(UniValue::VOBJ),a(UniValue::VARR),b(UniValue::VARR); int32_t i,n,matches; int64_t totalclosed=0,totalamount=0; std::vector<uint256> issuances,closed; char coinaddr[64];
CPubKey Marmarapk; struct CCcontract_info *cp,C;
cp = CCinit(&C,EVAL_MARMARA);
Marmarapk = GetUnspendable(cp,0);
@@ -988,9 +988,8 @@ UniValue MarmaraInfo(CPubKey refpk,int32_t firstheight,int32_t lastheight,int64_
GetCCaddress1of2(cp,coinaddr,Marmarapk,Mypubkey());
result.push_back(Pair("myCCactivated",coinaddr));
val = CCaddress_balance(coinaddr);
result.push_back(Pair("activated",ValueFromAmount(val)));
result.push_back(Pair("activated16",ValueFromAmount(AddMarmarainputs(mtx,pubkeys,coinaddr,val,16))));
result.push_back(Pair("activated",ValueFromAmount(CCaddress_balance(coinaddr))));
result.push_back(Pair("activated16",ValueFromAmount(AddMarmarainputs(mtx,pubkeys,coinaddr,0,16))));
GetCCaddress(cp,coinaddr,Mypubkey());
result.push_back(Pair("myCCaddress",coinaddr));