|
|
@ -329,15 +329,16 @@ int32_t basilisk_channelsend(struct supernet_info *myinfo,bits256 srchash,bits25 |
|
|
|
jaddnum(valsobj,"channel",channel); |
|
|
|
if ( msgid == 0 ) |
|
|
|
msgid = (uint32_t)time(NULL); |
|
|
|
jaddnum(valsobj,"fanout",MAX(8,(int32_t)sqrt(myinfo->NOTARY.NUMRELAYS)+2)); |
|
|
|
jaddnum(valsobj,"fanout",1);//MAX(8,(int32_t)sqrt(myinfo->NOTARY.NUMRELAYS)+2));
|
|
|
|
jaddnum(valsobj,"msgid",msgid); |
|
|
|
jaddnum(valsobj,"duration",duration); |
|
|
|
jaddnum(valsobj,"timeout",1000); |
|
|
|
jaddbits256(valsobj,"srchash",srchash); |
|
|
|
jaddbits256(valsobj,"desthash",desthash); |
|
|
|
//char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s numrelays.%d\n",datalen,channel,msgid,bits256_str(str,desthash),myinfo->NOTARY.NUMRELAYS);
|
|
|
|
char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s numrelays.%d\n",datalen,channel,msgid,bits256_str(str,desthash),myinfo->NOTARY.NUMRELAYS); |
|
|
|
if ( (retstr= basilisk_sendmessage(myinfo,0,0,0,desthash,valsobj,hexstr)) != 0 ) |
|
|
|
free(retstr); |
|
|
|
printf("message sent\n"); |
|
|
|
free_json(valsobj); |
|
|
|
if ( ptr != 0 ) |
|
|
|
free(ptr); |
|
|
@ -380,7 +381,7 @@ cJSON *basilisk_channelget(struct supernet_info *myinfo,bits256 srchash,bits256 |
|
|
|
jaddnum(valsobj,"msgid",msgid); |
|
|
|
jaddnum(valsobj,"width",width); |
|
|
|
jaddnum(valsobj,"timeout",BASILISK_TIMEOUT); |
|
|
|
jaddnum(valsobj,"fanout",MAX(8,(int32_t)sqrt(myinfo->NOTARY.NUMRELAYS)+1)); |
|
|
|
jaddnum(valsobj,"fanout",1);//MAX(8,(int32_t)sqrt(myinfo->NOTARY.NUMRELAYS)+1));
|
|
|
|
jaddnum(valsobj,"numrequired",1); |
|
|
|
jaddbits256(valsobj,"srchash",srchash); |
|
|
|
jaddbits256(valsobj,"desthash",desthash); |
|
|
|