diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index d39219828..78e8c2f0c 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -189,7 +189,7 @@ int32_t basilisk_channelsend(struct supernet_info *myinfo,bits256 hash,uint32_t valsobj = cJSON_CreateObject(); jaddnum(valsobj,"channel",channel); jaddnum(valsobj,"msgid",msgid); - //char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s\n",datalen,channel,msgid,bits256_str(str,hash)); + char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s\n",datalen,channel,msgid,bits256_str(str,hash)); if ( (retstr= basilisk_sendmessage(myinfo,0,0,0,hash,valsobj,hexstr)) != 0 ) { retval = 0; @@ -217,7 +217,7 @@ int32_t basilisk_message_returned(uint8_t *data,int32_t maxlen,cJSON *item) retval = datalen; } else printf("datalen.%d < maxlen.%d\n",datalen,maxlen); } else printf("no hexstr.%p or datalen.%d\n",hexstr,datalen); - } //else printf("no msgobj\n"); + } else printf("no msgobj\n"); return(retval); } @@ -230,7 +230,7 @@ int32_t basilisk_channelget(struct supernet_info *myinfo,bits256 hash,uint32_t c jaddnum(valsobj,"fanout",1); if ( (retstr= basilisk_getmessage(myinfo,0,0,0,hash,valsobj,0)) != 0 ) { - //printf("gotmessage.(%s)\n",retstr); + printf("channel.%u msgid.%u gotmessage.(%s)\n",channel,msgid,retstr); if ( (retarray= cJSON_Parse(retstr)) != 0 ) { if ( is_cJSON_Array(retarray) != 0 ) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 43f01d9cb..98cb6d749 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -1296,7 +1296,7 @@ void basilisk_swaploop(void *_swap) } } printf("finished swapstate.%x\n",swap->statebits); - sleep(10); + sleep(1); } if ( swap->iambob != 0 ) { diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 23eb7a078..2a833f714 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -497,14 +497,14 @@ int64_t iguana_pkhashbalance(struct supernet_info *myinfo,struct iguana_info *co } //printf("%.8f ",dstr(U[unspentind].value)); (*nump)++; + if ( array != 0 ) + jaddi(array,iguana_unspentjson(myinfo,coin,hdrsi,unspentind,T,&U[unspentind],rmd160,coinaddr,pubkey33,spentheight,remoteaddr)); } else { //printf("-%.8f ",dstr(U[unspentind].value)); spent += U[unspentind].value; } - if ( array != 0 ) - jaddi(array,iguana_unspentjson(myinfo,coin,hdrsi,unspentind,T,&U[unspentind],rmd160,coinaddr,pubkey33,spentheight,remoteaddr)); if ( p->pkind != U[unspentind].pkind ) printf("warning: [%d] p->pkind.%u vs U->pkind.%u for u%d\n",hdrsi,p->pkind,U[unspentind].pkind,unspentind); }