test
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
static bool fDaemon;
|
||||
extern char ASSETCHAINS_SYMBOL[16];
|
||||
void komodo_gateway_iteration(char *symbol);
|
||||
void komodo_iteration(char *symbol);
|
||||
|
||||
void WaitForShutdown(boost::thread_group* threadGroup)
|
||||
{
|
||||
@@ -44,6 +45,8 @@ void WaitForShutdown(boost::thread_group* threadGroup)
|
||||
MilliSleep(2000);
|
||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||
komodo_gateway_iteration(ASSETCHAINS_SYMBOL);
|
||||
else komodo_iteration("EUR");
|
||||
|
||||
fShutdown = ShutdownRequested();
|
||||
}
|
||||
if (threadGroup)
|
||||
|
||||
@@ -466,11 +466,16 @@ void komodo_gateway_iteration(char *symbol)
|
||||
sleep(30);
|
||||
}
|
||||
KOMODO_DEPOSIT = komodo_paxtotal();
|
||||
}
|
||||
|
||||
void komodo_iteration(char *symbol)
|
||||
{
|
||||
char *retstr,*base,*coinaddr,*txidstr,cmd[512]; uint64_t value,fiatoshis; cJSON *array,*item; int32_t i,n,vout,shortflag,height; uint256 txid; uint8_t rmd160[20],addrtype;
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||
{
|
||||
//[{"prev_hash":"5d5c9a49489b558de9e84f991f996dedaae6b9d0f157f82b2fec64662476d5cf","prev_vout":2,"EUR":0.78329000,"fiat":"EUR","height":57930,"KMD":0.10000000,"address":"RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5"}]
|
||||
char *retstr,*base,*coinaddr,*txidstr; uint64_t value,fiatoshis; cJSON *array,*item; int32_t n,vout,shortflag,height; uint256 txid; uint8_t rmd160[20],addrtype;
|
||||
if ( (retstr= issue_curl("{\"agent\":\"dpow\",\"method\":\"pending\",\"fiat\":\"EUR\"}")) != 0 )
|
||||
sprintf(cmd,"{\"agent\":\"dpow\",\"method\":\"pending\",\"fiat\":\"%s\"}",symbol);
|
||||
if ( (retstr= issue_curl(cmd)) != 0 )
|
||||
{
|
||||
if ( (array= cJSON_Parse(retstr)) != 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user