Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
b81c171faf
  1. 9
      crypto777/iguana_OS.c
  2. 2
      iguana/SuperNET.c
  3. 8
      iguana/swaps/iguana_BTCswap.c

9
crypto777/iguana_OS.c

@ -535,13 +535,12 @@ void OS_remove_directory(char *dirname)
//printf("error doing (%s)\n",buf); //printf("error doing (%s)\n",buf);
sprintf(buf,"rm %s/*",dirname); sprintf(buf,"rm %s/*",dirname);
if ( system(buf) != 0 ) if ( system(buf) != 0 )
printf("error doing (%s)\n",buf);
else
{ {
sprintf(buf,"rmdir %s",dirname); //printf("error doing (%s)\n",buf);
if ( system(buf) != 0 )
printf("second error doing (%s)\n",buf);
} }
sprintf(buf,"rmdir %s",dirname);
if ( system(buf) != 0 )
printf("second error doing (%s)\n",buf);
} }
} }

2
iguana/SuperNET.c

@ -582,7 +582,7 @@ char *SuperNET_DHTsend(struct supernet_info *myinfo,uint64_t destipbits,bits256
} }
else else
{ {
printf("DHT send\n"); //printf("DHT send\n");
SuperNET_hexmsgadd(myinfo,categoryhash,subhash,hexmsg,tai_now(),0); SuperNET_hexmsgadd(myinfo,categoryhash,subhash,hexmsg,tai_now(),0);
} }
jsonstr = jprint(json,1); jsonstr = jprint(json,1);

8
iguana/swaps/iguana_BTCswap.c

@ -414,7 +414,8 @@ int32_t instantdex_pubkeyargs(struct supernet_info *myinfo,struct bitcoin_swapin
{ {
char buf[3]; int32_t i,n,m,len=0; bits256 pubi; uint64_t txid; uint8_t secret160[20],pubkey[33]; char buf[3]; int32_t i,n,m,len=0; bits256 pubi; uint64_t txid; uint8_t secret160[20],pubkey[33];
sprintf(buf,"%c0",'A' - 0x02 + firstbyte); sprintf(buf,"%c0",'A' - 0x02 + firstbyte);
printf(">>>>>> start generating %s\n",buf); if ( numpubs > 2 )
printf(">>>>>> start generating %s\n",buf);
for (i=n=m=0; i<numpubs*100 && n<numpubs; i++) for (i=n=m=0; i<numpubs*100 && n<numpubs; i++)
{ {
pubi = instantdex_derivekeypair(myinfo,&swap->privkeys[n],pubkey,privkey,hash); pubi = instantdex_derivekeypair(myinfo,&swap->privkeys[n],pubkey,privkey,hash);
@ -440,7 +441,8 @@ int32_t instantdex_pubkeyargs(struct supernet_info *myinfo,struct bitcoin_swapin
} }
n++; n++;
} }
printf("n.%d m.%d len.%d numpubs.%d\n",n,m,len,swap->numpubs); if ( n > 2 || m > 2 )
printf("n.%d m.%d len.%d numpubs.%d\n",n,m,len,swap->numpubs);
return(n); return(n);
} }
@ -1053,7 +1055,7 @@ void instantdex_statemachine_iter(struct supernet_info *myinfo,struct exchange_i
swap->myfee = instantdex_feetx(myinfo,&swap->mine,swap,iguana_coinfind("BTC")); swap->myfee = instantdex_feetx(myinfo,&swap->mine,swap,iguana_coinfind("BTC"));
while ( (ptr= queue_dequeue(&swap->eventsQ,0)) != 0 ) while ( (ptr= queue_dequeue(&swap->eventsQ,0)) != 0 )
{ {
printf("deQ arg.%p new.%p\n",ptr->argjson,ptr->newjson); //printf("deQ arg.%p new.%p\n",ptr->argjson,ptr->newjson);
if ( (str= instantdex_statemachine(BTC_states,BTC_numstates,myinfo,exchange,swap,ptr->cmd,ptr->argjson,ptr->newjson,ptr->serdata,ptr->serdatalen)) != 0 ) if ( (str= instantdex_statemachine(BTC_states,BTC_numstates,myinfo,exchange,swap,ptr->cmd,ptr->argjson,ptr->newjson,ptr->serdata,ptr->serdatalen)) != 0 )
free(str); free(str);
if ( ptr->argjson != 0 ) if ( ptr->argjson != 0 )

Loading…
Cancel
Save