|
@ -43,7 +43,7 @@ cJSON *dpow_getinfo(struct supernet_info *myinfo,struct iguana_info *coin) |
|
|
{ |
|
|
{ |
|
|
buf[0] = 0; |
|
|
buf[0] = 0; |
|
|
retstr = bitcoind_getinfo(coin->symbol,coin->chain->serverport,coin->chain->userpass,coin->getinfostr); |
|
|
retstr = bitcoind_getinfo(coin->symbol,coin->chain->serverport,coin->chain->userpass,coin->getinfostr); |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -275,7 +275,7 @@ bits256 dpow_getblockhash(struct supernet_info *myinfo,struct iguana_info *coin, |
|
|
sprintf(buf,"%d",height); |
|
|
sprintf(buf,"%d",height); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getblockhash",buf); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getblockhash",buf); |
|
|
//printf("%s ht.%d -> getblockhash.(%s)\n",coin->symbol,height,retstr);
|
|
|
//printf("%s ht.%d -> getblockhash.(%s)\n",coin->symbol,height,retstr);
|
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -304,7 +304,7 @@ cJSON *dpow_getblock(struct supernet_info *myinfo,struct iguana_info *coin,bits2 |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getblock",buf); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getblock",buf); |
|
|
if ( 0 && strcmp(coin->symbol,"USD") == 0 ) |
|
|
if ( 0 && strcmp(coin->symbol,"USD") == 0 ) |
|
|
printf("%s getblock.(%s)\n",coin->symbol,retstr); |
|
|
printf("%s getblock.(%s)\n",coin->symbol,retstr); |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -329,7 +329,7 @@ char *dpow_validateaddress(struct supernet_info *myinfo,struct iguana_info *coin |
|
|
{ |
|
|
{ |
|
|
sprintf(buf,"\"%s\"",address); |
|
|
sprintf(buf,"\"%s\"",address); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"validateaddress",buf); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"validateaddress",buf); |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -349,7 +349,7 @@ cJSON *dpow_gettxout(struct supernet_info *myinfo,struct iguana_info *coin,bits2 |
|
|
if ( coin->FULLNODE < 0 ) |
|
|
if ( coin->FULLNODE < 0 ) |
|
|
{ |
|
|
{ |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"gettxout",buf); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"gettxout",buf); |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -380,7 +380,7 @@ char *dpow_decoderawtransaction(struct supernet_info *myinfo,struct iguana_info |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"decoderawtransaction",paramstr); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"decoderawtransaction",paramstr); |
|
|
//printf("%s decoderawtransaction.(%s) <- (%s)\n",coin->symbol,retstr,paramstr);
|
|
|
//printf("%s decoderawtransaction.(%s) <- (%s)\n",coin->symbol,retstr,paramstr);
|
|
|
free(paramstr); |
|
|
free(paramstr); |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -402,7 +402,7 @@ cJSON *dpow_gettransaction(struct supernet_info *myinfo,struct iguana_info *coin |
|
|
if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getrawtransaction",buf)) != 0 ) |
|
|
if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getrawtransaction",buf)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
{ |
|
|
{ |
|
@ -509,7 +509,7 @@ char *dpow_signrawtransaction(struct supernet_info *myinfo,struct iguana_info *c |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"signrawtransaction",paramstr); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"signrawtransaction",paramstr); |
|
|
//printf("%s signrawtransaction.(%s) params.(%s)\n",coin->symbol,retstr,paramstr);
|
|
|
//printf("%s signrawtransaction.(%s) params.(%s)\n",coin->symbol,retstr,paramstr);
|
|
|
free(paramstr); |
|
|
free(paramstr); |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
return(retstr); |
|
|
return(retstr); |
|
|
} |
|
|
} |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
|
else if ( coin->FULLNODE > 0 || coin->VALIDATENODE > 0 ) |
|
@ -1298,7 +1298,7 @@ int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int3 |
|
|
printf("error height %d\n",height); |
|
|
printf("error height %d\n",height); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
usleep(1000); |
|
|
usleep(10000); |
|
|
} |
|
|
} |
|
|
if ( height >= currentheight ) |
|
|
if ( height >= currentheight ) |
|
|
*isrealtimep = (uint32_t)time(NULL); |
|
|
*isrealtimep = (uint32_t)time(NULL); |
|
|