From 912636dae4540c57fcb34316f2bd496babd61af0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 24 Sep 2016 09:39:59 -0300 Subject: [PATCH] test --- basilisk/basilisk_swap.c | 11 +++++------ gecko/gecko_mempool.c | 1 + iguana/iguana_sign.c | 7 ++++++- iguana/iguana_unspents.c | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 2478526e8..46488875a 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -719,7 +719,7 @@ int32_t basilisk_rawtx_gen(char *str,struct supernet_info *myinfo,int32_t iambob printf("%s locktime.%u\n",rawtx->name,locktime); if ( (retstr= basilisk_bitcoinrawtx(myinfo,rawtx->coin,"",basilisktag,jint(valsobj,"timeout"),valsobj)) != 0 ) { - printf("%s got.(%s)\n",str,retstr); + printf("%s %s basilisk_bitcoinrawtx.(%s)\n",rawtx->name,str,retstr); flag = 0; if ( (retarray= cJSON_Parse(retstr)) != 0 ) { @@ -738,7 +738,6 @@ int32_t basilisk_rawtx_gen(char *str,struct supernet_info *myinfo,int32_t iambob } else printf("error creating %s feetx\n",iambob != 0 ? "BOB" : "ALICE"); free_json(privkeyarray); free_json(valsobj); - printf("rawtx retval.%d\n",retval); return(retval); } @@ -1059,7 +1058,7 @@ void basilisk_sendpubkeys(struct supernet_info *myinfo,struct basilisk_swap *swa { int32_t datalen; datalen = basilisk_swapdata_deck(myinfo,swap,data,maxlen); - printf("send deck.%d\n",datalen); + //printf("send deck.%d\n",datalen); swap->statebits |= basilisk_swapsend(myinfo,swap,0x02,data,datalen,0x01,swap->crcs_mypub); } @@ -1067,7 +1066,7 @@ int32_t basilisk_checkdeck(struct supernet_info *myinfo,struct basilisk_swap *sw { if ( (swap->statebits & 0x02) == 0 ) { - printf("check for other deck\n"); + //printf("check for other deck\n"); if ( basilisk_swapget(myinfo,swap,0x02,data,maxlen,basilisk_verify_otherdeck) == 0 ) swap->statebits |= 0x02; else return(-1); @@ -1108,7 +1107,7 @@ void basilisk_sendchoosei(struct supernet_info *myinfo,struct basilisk_swap *swa void basilisk_waitchoosei(struct supernet_info *myinfo,struct basilisk_swap *swap,uint8_t *data,int32_t maxlen) { uint8_t pubkey33[33]; char str[65]; - printf("check otherchoosei\n"); + //printf("check otherchoosei\n"); if ( basilisk_swapget(myinfo,swap,0x08,data,maxlen,basilisk_verify_choosei) == 0 ) { if ( swap->iambob != 0 ) @@ -1160,7 +1159,7 @@ void basilisk_sendmostprivs(struct supernet_info *myinfo,struct basilisk_swap *s for (i=0; i<20; i++) data[datalen++] = swap->secretAm[i]; } - printf("send privkeys.%d\n",datalen); + //printf("send privkeys.%d\n",datalen); swap->statebits |= basilisk_swapsend(myinfo,swap,0x20,data,datalen,0x10,swap->crcs_myprivs); } diff --git a/gecko/gecko_mempool.c b/gecko/gecko_mempool.c index 7a546c19e..402e0d83d 100755 --- a/gecko/gecko_mempool.c +++ b/gecko/gecko_mempool.c @@ -239,6 +239,7 @@ char *gecko_txarrived(struct supernet_info *myinfo,struct iguana_info *virt,char { if ( iguana_RTunspentindfind(myinfo,virt,&outpt,0,0,0,&value,&spentheight,msg.vins[i].prev_hash,msg.vins[i].prev_vout,virt->bundlescount-1,1) == 0 ) { + printf("gecko txarrived\n"); if ( iguana_unspentavail(myinfo,virt,outpt,minconf,maxconf) != value ) { printf("vin.%d already spent\n",i); diff --git a/iguana/iguana_sign.c b/iguana/iguana_sign.c index 3d940cd7d..45a041a7c 100755 --- a/iguana/iguana_sign.c +++ b/iguana/iguana_sign.c @@ -759,7 +759,12 @@ cJSON *bitcoin_data2json(struct iguana_info *coin,int32_t height,bits256 *txidp, jaddstr(txobj,"coin",coin->symbol); } if ( n != len ) - printf("data2json n.%d vs len.%d\n",n,len); + { + int32_t i; + for (i=0; i<=len; i++) + printf("%02x",serialized[i]); + printf(" data2json n.%d vs len.%d\n",n,len); + } return(txobj); } diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index f04c965d1..160431a17 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -970,7 +970,7 @@ uint64_t iguana_unspentavail(struct supernet_info *myinfo,struct iguana_info *co } else { - printf("%s illegal unspentind.%u vs %u [%d]\n",coin->symbol,outpt.unspentind,rdata->numunspents,bp->hdrsi); + printf("%s illegal unspentind.%u [%d] vs %u [%d]\n",coin->symbol,outpt.unspentind,outpt.hdrsi,rdata->numunspents,bp->hdrsi); return(-2); } }