Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
3ca7d45c79
  1. 6
      basilisk/basilisk_MSG.c
  2. 2
      basilisk/basilisk_swap.c
  3. 4
      iguana/iguana_unspents.c

6
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 )

2
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 )
{

4
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);
}

Loading…
Cancel
Save