|
@ -277,10 +277,10 @@ int32_t dpow_paxpending(uint8_t *hex,int32_t hexsize,uint32_t *paxwdcrcp,bits256 |
|
|
{ |
|
|
{ |
|
|
n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes); |
|
|
n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes); |
|
|
n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth); |
|
|
n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth); |
|
|
if ( strcmp(bp->srccoin->symbol,"PIZZA") == 0 && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) |
|
|
if ( strncmp(bp->srccoin->symbol,"TXSCL",5) == 0 && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) |
|
|
{ |
|
|
{ |
|
|
kmdcoin = bp->destcoin; |
|
|
kmdcoin = bp->destcoin; |
|
|
if ( (bp->height % 10) == 0 && kmdcoin->lastbestheight > 100 && (retjson= dpow_MoMoMdata(kmdcoin,bp->srccoin->symbol,(kmdcoin->lastbestheight/10)*10 - 5)) != 0 ) |
|
|
if ( (retjson= dpow_MoMoMdata(kmdcoin,bp->srccoin->symbol,(kmdcoin->lastbestheight/10)*10 - 5)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
if ( (hexstr= jstr(retjson,"data")) != 0 && (hexlen= (int32_t)strlen(hexstr)) > 0 && n+hexlen/2 <= hexsize ) |
|
|
if ( (hexstr= jstr(retjson,"data")) != 0 && (hexlen= (int32_t)strlen(hexstr)) > 0 && n+hexlen/2 <= hexsize ) |
|
|
{ |
|
|
{ |
|
@ -380,6 +380,13 @@ cJSON *dpow_getblock(struct supernet_info *myinfo,struct iguana_info *coin,bits2 |
|
|
return(json); |
|
|
return(json); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int32_t dpow_is015(char *symbol) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( strcmp("CHIPS",symbol) == 0 || strcmp("GAME",symbol) == 0 ) //strcmp("BTC",symbol) == 0 ||
|
|
|
|
|
|
return(1); |
|
|
|
|
|
else return(0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
char *dpow_validateaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *address) |
|
|
char *dpow_validateaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *address) |
|
|
{ |
|
|
{ |
|
|
char buf[128],*retstr=0; cJSON *retjson; |
|
|
char buf[128],*retstr=0; cJSON *retjson; |
|
@ -391,7 +398,7 @@ char *dpow_validateaddress(struct supernet_info *myinfo,struct iguana_info *coin |
|
|
//printf("%s -> (%s)\n",buf,retstr!=0?retstr:"null");
|
|
|
//printf("%s -> (%s)\n",buf,retstr!=0?retstr:"null");
|
|
|
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|
|
if ( (retjson= cJSON_Parse(retstr)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
if ( strcmp(coin->symbol,"BTC") == 0 && jobj(retjson,"error") == 0 && jobj(retjson,"ismine") == 0 && strcmp(coin->validateaddress,"validateaddress") == 0 ) |
|
|
if ( dpow_is015(coin->symbol) != 0 && jobj(retjson,"error") == 0 && jobj(retjson,"ismine") == 0 && strcmp(coin->validateaddress,"validateaddress") == 0 ) |
|
|
{ |
|
|
{ |
|
|
printf("autochange %s validateaddress -> getaddressinfo\n",coin->symbol); |
|
|
printf("autochange %s validateaddress -> getaddressinfo\n",coin->symbol); |
|
|
strcpy(coin->validateaddress,"getaddressinfo"); |
|
|
strcpy(coin->validateaddress,"getaddressinfo"); |
|
@ -581,7 +588,7 @@ char *dpow_signrawtransaction(struct supernet_info *myinfo,struct iguana_info *c |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,coin->signtxstr,paramstr); |
|
|
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,coin->signtxstr,paramstr); |
|
|
if ( strcmp(coin->signtxstr,"signrawtransaction") == 0 && (retjson= cJSON_Parse(retstr)) != 0 ) |
|
|
if ( strcmp(coin->signtxstr,"signrawtransaction") == 0 && (retjson= cJSON_Parse(retstr)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
if ( jobj(retjson,"error") != 0 ) |
|
|
if ( jobj(retjson,"error") != 0 && dpow_is015(coin->symbol) != 0 ) |
|
|
{ |
|
|
{ |
|
|
strcpy(coin->signtxstr,"signrawtransactionwithwallet"); |
|
|
strcpy(coin->signtxstr,"signrawtransactionwithwallet"); |
|
|
free(retstr); |
|
|
free(retstr); |
|
|