diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 7d57322d0..2ada533f1 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -56,8 +56,8 @@ void WaitForShutdown(boost::thread_group* threadGroup) if ( ASSETCHAINS_SYMBOL[0] == 0 ) { komodo_passport_iteration(); - MilliSleep(1000); - } else MilliSleep(1000); + MilliSleep(10000); + } else MilliSleep(10000); fShutdown = ShutdownRequested(); } if (threadGroup) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index ad7237217..efd784291 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -1322,6 +1322,8 @@ int32_t komodo_faststateinit(struct komodo_state *sp,char *fname,char *symbol,ch return(-1); } +uint64_t komodo_interestsum(); + void komodo_passport_iteration() { static long lastpos[34]; static char userpass[33][1024]; static uint32_t lasttime,callcounter; @@ -1333,6 +1335,7 @@ void komodo_passport_iteration() fprintf(stderr,"[%s] PASSPORT iteration waiting for KOMODO_INITDONE\n",ASSETCHAINS_SYMBOL); sleep(3); } + komodo_interestsum(); refsp = komodo_stateptr(symbol,dest); if ( ASSETCHAINS_SYMBOL[0] == 0 ) { diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp index 205282533..5dff6e015 100644 --- a/src/rpcmisc.cpp +++ b/src/rpcmisc.cpp @@ -90,11 +90,11 @@ UniValue getinfo(const UniValue& params, bool fHelp) + HelpExampleRpc("getinfo", "") ); fprintf(stderr,"before LOCK cs_main %u\n",(uint32_t)time(NULL)); -#ifdef ENABLE_WALLET - LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL); -#else +//#ifdef ENABLE_WALLET +// LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL); +//#else LOCK(cs_main); -#endif +//#endif fprintf(stderr,"after LOCK cs_main %u\n",(uint32_t)time(NULL)); proxyType proxy; @@ -120,9 +120,9 @@ UniValue getinfo(const UniValue& params, bool fHelp) #ifdef ENABLE_WALLET if (pwalletMain) { obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); - obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance()))); + obj.push_back(Pair("balance", ValueFromAmount(KOMODO_WALLETBALANCE))); //pwalletMain->GetBalance() if ( ASSETCHAINS_SYMBOL[0] == 0 ) - obj.push_back(Pair("interest", ValueFromAmount(komodo_interestsum()))); + obj.push_back(Pair("interest", ValueFromAmount(KOMODO_INTERESTSUM))); //komodo_interestsum() } #endif fprintf(stderr,"after wallet %u\n",(uint32_t)time(NULL)); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 7c7f6cc50..627ffe550 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2714,6 +2714,7 @@ uint64_t komodo_interestsum() } } KOMODO_INTERESTSUM = sum; + KOMODO_WALLETBALANCE = pwalletMain->GetBalance(); return(sum); }