From 9de70efe3a05513b79f65e872e6d13467f7205f5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 7 Apr 2018 22:05:45 +0300 Subject: [PATCH] Test --- src/komodo_bitcoind.h | 9 ++++++--- src/komodo_utils.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 6a5b2ce8f..7737b1973 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -992,14 +992,17 @@ UniValue listunspent(const UniValue& params, bool fHelp); int32_t komodo_staked(uint256 *utxotxidp,int32_t *utxovoutp,uint64_t *utxovaluep,uint8_t *utxosig) { - UniValue result,params = NullUniValue; + UniValue params = NullUniValue; *utxovaluep = 0; memset(utxotxidp,0,sizeof(*utxotxidp)); memset(utxovoutp,0,sizeof(*utxovoutp)); memset(utxosig,0,72); fprintf(stderr,"call listunspent\n"); - result = listunspent(params,false); - fprintf(stderr,"listunspent.(%s)\n",result.get_str().c_str()); + vector vecOutputs; + assert(pwalletMain != NULL); + LOCK2(cs_main, pwalletMain->cs_wallet); + pwalletMain->AvailableCoins(vecOutputs, false, NULL, true); + fprintf(stderr,"listunspent done\n"); return(72); } diff --git a/src/komodo_utils.h b/src/komodo_utils.h index e8e801141..c38df1411 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1606,7 +1606,7 @@ void komodo_args(char *argv0) komodo_configfile(ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT + 1); komodo_userpass(ASSETCHAINS_USERPASS,ASSETCHAINS_SYMBOL); COINBASE_MATURITY = 1; - fprintf(stderr,"ASSETCHAINS_PORT %s %u (%s)\n",ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT,ASSETCHAINS_USERPASS); + //fprintf(stderr,"ASSETCHAINS_PORT %s %u (%s)\n",ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT,ASSETCHAINS_USERPASS); } //ASSETCHAINS_NOTARIES = GetArg("-ac_notaries",""); //komodo_assetchain_pubkeys((char *)ASSETCHAINS_NOTARIES.c_str());