Browse Source

fix?

blackjok3r
blackjok3r 6 years ago
parent
commit
33b0022401
  1. 9
      iguana/dpow/dpow_rpc.c

9
iguana/dpow/dpow_rpc.c

@ -295,7 +295,7 @@ cJSON *dpow_MoMoMdata(struct iguana_info *coin,char *symbol,int32_t kmdheight,ui
int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsize,uint32_t *paxwdcrcp,bits256 MoM,uint32_t MoMdepth,uint16_t CCid,int32_t src_or_dest,struct dpow_block *bp) int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsize,uint32_t *paxwdcrcp,bits256 MoM,uint32_t MoMdepth,uint16_t CCid,int32_t src_or_dest,struct dpow_block *bp)
{ {
struct iguana_info *coin,*kmdcoin=0; char *retstr,*hexstr; cJSON *retjson,*infojson, *srcinfojson; int32_t kmdheight=0,hexlen=0,n=0,ppMoMheight=0; uint32_t paxwdcrc=0,CCid=0; struct iguana_info *coin,*kmdcoin=0; char *retstr,*hexstr; cJSON *retjson,*infojson, *srcinfojson; int32_t kmdheight=0,hexlen=0,n=0,ppMoMheight=0; uint32_t paxwdcrc=0,CCid1=0;
if ( dpow_smallopreturn(bp->srccoin->symbol) == 0 || src_or_dest != 0 ) if ( dpow_smallopreturn(bp->srccoin->symbol) == 0 || src_or_dest != 0 )
{ {
n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes); n += iguana_rwbignum(1,&hex[n],sizeof(MoM),MoM.bytes);
@ -303,16 +303,15 @@ int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsiz
n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth); n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth);
if ( (srcinfojson= dpow_getinfo(myinfo,bp->srccoin)) != 0 ) if ( (srcinfojson= dpow_getinfo(myinfo,bp->srccoin)) != 0 )
{ {
CCid = juint(srcinfojson,"CCid"); CCid1 = juint(srcinfojson,"CCid");
if ( CCid > 1 && jint(srcinfojson,"ppMoMheight") != 0 ) if ( CCid1 > 1 && jint(srcinfojson,"ppMoMheight") != 0 )
ppMoMheight = jint(srcinfojson,"ppMoMheight"); ppMoMheight = jint(srcinfojson,"ppMoMheight");
free_json(srcinfojson); free_json(srcinfojson);
printf("ppMoMheight.%i CCid.%i\n", ppMoMheight, CCid); printf("ppMoMheight.%i CCid.%i\n", ppMoMheight, CCid);
} }
if ( CCid > 1 && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) //strncmp(bp->srccoin->symbol,"TXSCL",5) == 0 && if ( CCid1 > 1 && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 ) //strncmp(bp->srccoin->symbol,"TXSCL",5) == 0 &&
{ {
kmdcoin = bp->destcoin; kmdcoin = bp->destcoin;
coin = bp->srccoin;
if ( (infojson= dpow_getinfo(myinfo,kmdcoin)) != 0 ) if ( (infojson= dpow_getinfo(myinfo,kmdcoin)) != 0 )
{ {
kmdheight = jint(infojson,"blocks"); kmdheight = jint(infojson,"blocks");

Loading…
Cancel
Save