Browse Source

test

etomic
jl777 8 years ago
parent
commit
6a88a0b19c
  1. 25
      iguana/dpow/dpow_network.c
  2. 2
      iguana/dpow/dpow_rpc.c

25
iguana/dpow/dpow_network.c

@ -371,19 +371,30 @@ char *dex_response(int32_t *broadcastflagp,struct supernet_info *myinfo,struct d
char *dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *data,int32_t datalen,int32_t M)
{
char *retstr = 0; int32_t i,max = myinfo->numdexipbits;
for (i=0; i<=max; i++)
char *retstrs[64]; int32_t i,j,max = myinfo->numdexipbits;
memset(retstrs,0,sizeof(retstrs));
for (i=j=0; i<=max; i++)
{
if ( (retstr= _dex_reqsend(myinfo,handler,data,datalen)) != 0 )
if ( (retstrs[j]= _dex_reqsend(myinfo,handler,data,datalen)) != 0 )
{
if ( strncmp(retstr,"{\"error\":\"null return\"}",strlen("{\"error\":\"null return\"}")) != 0 )
break;
if ( strncmp(retstrs[j],"{\"error\":\"null return\"}",strlen("{\"error\":\"null return\"}")) != 0 )
{
if ( ++j == M )
break;
}
else if ( i < max )
free(retstr);
free(retstrs[j]);
}
//printf("automatic retry.%d of %d\n",i,max);
}
return(retstr);
if ( j == 1 )
return(retstrs[0]);
else
{
for (i=0; i<j; i++)
printf("(%s).%d\n",retstrs[i],i);
}
return(retstrs[0]);
}
char *_dex_sendrequest(struct supernet_info *myinfo,struct dex_request *dexreq,int32_t M)

2
iguana/dpow/dpow_rpc.c

@ -501,9 +501,9 @@ char *dpow_importaddress(struct supernet_info *myinfo,struct iguana_info *coin,c
}
if ( isvalid == 0 )
return(clonestr("{\"isvalid\":false}"));
update_alladdresses(myinfo,coin,address);
if ( doneflag != 0 )
return(0); // success
update_alladdresses(myinfo,coin,address);
if ( coin->FULLNODE < 0 )
{
sprintf(buf,"[\"%s\", \"%s\", false]",address,address);

Loading…
Cancel
Save