Browse Source

Test

etomic
jl777 8 years ago
parent
commit
d843d822a2
  1. 17
      basilisk/basilisk_swap.c
  2. 2
      iguana/unparsed.txt

17
basilisk/basilisk_swap.c

@ -949,7 +949,8 @@ int32_t basilisk_swapget(struct supernet_info *myinfo,struct basilisk_swap *swap
desthash.bytes[i] = ptr[offset++];
offset += iguana_rwnum(0,&ptr[offset],sizeof(uint32_t),&quoteid);
offset += iguana_rwnum(0,&ptr[offset],sizeof(uint32_t),&_msgbits);
basilisk_swapgotdata(myinfo,swap,crc32,srchash,desthash,quoteid,_msgbits,&ptr[offset],size-offset);
if ( size > offset )
basilisk_swapgotdata(myinfo,swap,crc32,srchash,desthash,quoteid,_msgbits,&ptr[offset],size-offset);
if ( ptr != 0 )
nn_freemsg(ptr), ptr = 0;
}
@ -980,9 +981,19 @@ uint32_t basilisk_swapsend(struct supernet_info *myinfo,struct basilisk_swap *sw
buf[offset++] = swap->I.otherhash.bytes[i];
offset += iguana_rwnum(1,&buf[offset],sizeof(swap->I.req.quoteid),&swap->I.req.quoteid);
offset += iguana_rwnum(1,&buf[offset],sizeof(msgbits),&msgbits);
memcpy(&buf[offset],data,datalen), offset += datalen;
if ( datalen > 0 )
memcpy(&buf[offset],data,datalen), offset += datalen;
if ( (sentbytes= nn_send(swap->pushsock,buf,offset,0)) != offset )
printf("sentbytes.%d vs offset.%d\n",sentbytes,offset);
else
{
if ( msgbits == 0x80000000 )
{
for (i=0; i<4; i++)
printf("%02x ",data[i]);
printf("datalen.%d\n",datalen);
}
}
free(buf);
return(0);
}
@ -1061,7 +1072,7 @@ int32_t instantdex_pubkeyargs(void *ctx,struct basilisk_swap *swap,int32_t numpu
for (i=n=m=0; i<numpubs*100 && n<numpubs; i++)
{
pubi = instantdex_derivekeypair(ctx,&privkey,pubkey,privkey,hash);
printf("i.%d n.%d numpubs.%d %02x vs %02x\n",i,n,numpubs,pubkey[0],firstbyte);
//printf("i.%d n.%d numpubs.%d %02x vs %02x\n",i,n,numpubs,pubkey[0],firstbyte);
if ( pubkey[0] != firstbyte )
continue;
if ( n < 2 )

2
iguana/unparsed.txt

@ -1 +1 @@
6304ed6fbc58b1752102b12fb1636597dbb81f5da6b05fa8e7d1d2613ada75c57fe6de2816e7ec3b23b5ac67a914f2d2987381a415363dc6a07c2d6440eefff54279882103fef6acf0aa9a0306647a928cc20784fe8349d020d811d2c098b370aa7bc3ba64ac68
6304d878bc58b17521029c992b28fcb42e4ecb64a7bef533a7998bd971a287891e7b51230b68f3051ebeac67a914782e47739e559fe5da02f4b40be525e7c47fccee88210387ddc27d8419f5eadb7f32e44f9246c168d379e73ab372398258acc7ef4fc36eac68

Loading…
Cancel
Save