Test
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -2714,6 +2714,7 @@ uint64_t komodo_interestsum()
|
||||
}
|
||||
}
|
||||
KOMODO_INTERESTSUM = sum;
|
||||
KOMODO_WALLETBALANCE = pwalletMain->GetBalance();
|
||||
return(sum);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user