From 21ee88562ce2b4fe2c8d7fff9197f83a070d1bdf Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 29 Jan 2019 01:39:10 -1100 Subject: [PATCH] CCbalance --- src/cc/cclib.cpp | 2 +- src/wallet/rpcwallet.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cc/cclib.cpp b/src/cc/cclib.cpp index 7d5a26e42..83afb86ef 100644 --- a/src/cc/cclib.cpp +++ b/src/cc/cclib.cpp @@ -257,7 +257,7 @@ int64_t AddCClibInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubK { txid = it->first.txhash; vout = (int32_t)it->first.index; - char str[65]; fprintf(stderr,"check %s/v%d %.8f`\n",uint256_str(str,txid),vout,(double)it->second.satoshis/COIN); + char str[65]; fprintf(stderr,"%s check %s/v%d %.8f\n",coinaddr,uint256_str(str,txid),vout,(double)it->second.satoshis/COIN); if ( it->second.satoshis < threshold ) continue; // no need to prevent dup diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 970dfa3cf..fc1839de2 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5220,6 +5220,7 @@ UniValue CCaddress(struct CCcontract_info *cp,char *name,std::vectorunspendableCCaddr)); + result.push_back(Pair("CCbalance",ValueFromAmount(CCaddress_balance(cp->unspendableCCaddr)))); sprintf(str,"%smarker",name); result.push_back(Pair(str,cp->normaladdr)); result.push_back(Pair("GatewaysPubkey","03ea9c062b9652d8eff34879b504eda0717895d27597aaeb60347d65eed96ccb40")); @@ -5234,7 +5235,10 @@ UniValue CCaddress(struct CCcontract_info *cp,char *name,std::vector