|
@ -262,16 +262,16 @@ cJSON *issue_calcMoM(struct iguana_info *coin,int32_t height,int32_t MoMdepth) |
|
|
return(retjson); |
|
|
return(retjson); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
cJSON *dpow_MoMoMdata(struct iguana_info *coin,char *symbol,int32_t kmdheight) |
|
|
cJSON *dpow_MoMoMdata(struct iguana_info *coin,char *symbol,int32_t kmdheight,uint16_t CCid) |
|
|
{ |
|
|
{ |
|
|
char buf[128],*retstr=0; cJSON *retjson = 0; struct iguana_info *src; |
|
|
char buf[128],*retstr=0; cJSON *retjson = 0; struct iguana_info *src; |
|
|
if ( coin->FULLNODE < 0 && strcmp(coin->symbol,"KMD") == 0 && (src= iguana_coinfind(symbol)) != 0 ) |
|
|
if ( coin->FULLNODE < 0 && strcmp(coin->symbol,"KMD") == 0 && (src= iguana_coinfind(symbol)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
sprintf(buf,"[\"%s\", \"%d\", \"%d\"]",symbol,kmdheight,src->MoMoMheight); |
|
|
sprintf(buf,"[\"%s\", \"%d\", \"%d\"]",symbol,kmdheight,CCid); |
|
|
if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"MoMoMdata",buf)) != 0 ) |
|
|
if ( (retstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"MoMoMdata",buf)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
retjson = cJSON_Parse(retstr); |
|
|
retjson = cJSON_Parse(retstr); |
|
|
printf("MoMoM.%s -> %s\n",buf,retstr); |
|
|
printf("%s kmdheight.%d CCid.%u MoMoM.%s -> %s\n",symbol,kmdheight,CCid,buf,retstr); |
|
|
free(retstr); |
|
|
free(retstr); |
|
|
} |
|
|
} |
|
|
usleep(10000); |
|
|
usleep(10000); |
|
@ -291,7 +291,7 @@ int32_t dpow_paxpending(uint8_t *hex,int32_t hexsize,uint32_t *paxwdcrcp,bits256 |
|
|
if ( strncmp(bp->srccoin->symbol,"TXSCL",5) == 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 ( (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,bp->CCid)) != 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 ) |
|
|
{ |
|
|
{ |
|
|