Browse Source

Test

etomic
jl777 8 years ago
parent
commit
348e68f398
  1. 4
      basilisk/basilisk_DEX.c
  2. 2
      basilisk/basilisk_MSG.c

4
basilisk/basilisk_DEX.c

@ -694,9 +694,9 @@ HASH_ARRAY_STRING(InstantDEX,request,hash,vals,hexstr)
basilisk_channelsend(myinfo,myinfo->myaddr.persistent,hash,DEX_channel,msgid,serialized,datalen,60);
numiters++;
}*/
if ( crc != 0 )//basilisk_channelsend(myinfo,R.srchash,R.desthash,DEX_channel,(uint32_t)time(NULL),serialized,datalen,30) == 0 )
//if ( crc != 0 )//basilisk_channelsend(myinfo,R.srchash,R.desthash,DEX_channel,(uint32_t)time(NULL),serialized,datalen,30) == 0 )
return(clonestr("{\"result\":\"DEX message sent\"}"));
else return(clonestr("{\"error\":\"DEX message couldnt be sent\"}"));
//else return(clonestr("{\"error\":\"DEX message couldnt be sent\"}"));
}
return(clonestr("{\"error\":\"DEX message not sent\"}"));
}

2
basilisk/basilisk_MSG.c

@ -386,7 +386,7 @@ cJSON *basilisk_channelget(struct supernet_info *myinfo,bits256 srchash,bits256
jaddbits256(valsobj,"desthash",desthash);
if ( (retstr= basilisk_getmessage(myinfo,0,0,0,desthash,valsobj,0)) != 0 )
{
printf("channel.%u msgid.%u gotmessage.(%d)\n",channel,msgid,(int32_t)strlen(retstr));
printf("channel.%u msgid.%u gotmessage.(%d) %s\n",channel,msgid,(int32_t)strlen(retstr),strlen(retstr) < 100 ? retstr : "(too long)");
if ( (retarray= cJSON_Parse(retstr)) != 0 )
{
if ( is_cJSON_Array(retarray) == 0 )

Loading…
Cancel
Save