From ac6d09b0d0679d6ffd6273c45d0c11fa0bce37ca Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 26 Sep 2016 19:48:26 -0300 Subject: [PATCH] test --- basilisk/basilisk_swap.c | 6 +++++- iguana/iguana_sign.c | 6 ++---- iguana/iguana_unspents.c | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 5184b329a..721ba1af0 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -403,7 +403,7 @@ int32_t basilisk_verify_bobdeposit(struct supernet_info *myinfo,void *ptr,uint8_ int32_t basilisk_bobdeposit_refund(struct supernet_info *myinfo,struct basilisk_swap *swap) { - uint8_t userdata[512],revrmd160[20]; int32_t len = 0; + uint8_t userdata[512],revrmd160[20],testpub[33]; int32_t len = 0; len = basilisk_swapuserdata(userdata,1,swap->privBn,0x03,swap->pubB0,0,1); int32_t i; for (i=0; ictx,testpub,swap->myprivs[0]); + if ( memcmp(swap->pubB0.bytes,testpub+1,32) == 0 ) + printf("VERIFIED priv -> pub\n"); + else printf("ERROR priv -> pub\n"); return(basilisk_rawtx_sign(myinfo,swap->bobcoin->blocks.hwmchain.height,swap,&swap->bobrefund,&swap->bobdeposit,swap->myprivs[0],0,userdata,len)); } diff --git a/iguana/iguana_sign.c b/iguana/iguana_sign.c index b380310fa..37146c3f4 100755 --- a/iguana/iguana_sign.c +++ b/iguana/iguana_sign.c @@ -1253,7 +1253,7 @@ cJSON *bitcoin_txoutput(cJSON *txobj,uint8_t *paymentscript,int32_t len,uint64_t int32_t iguana_interpreter(struct iguana_info *coin,cJSON *logarray,int64_t nLockTime,struct vin_info *V,int32_t numvins) { - uint8_t script[IGUANA_MAXSCRIPTSIZE],*activescript; char str[IGUANA_MAXSCRIPTSIZE*2+1]; int32_t vini,i,scriptlen,activescriptlen,errs = 0; cJSON *spendscript,*item; + uint8_t script[IGUANA_MAXSCRIPTSIZE],*activescript; char str[IGUANA_MAXSCRIPTSIZE*2+1]; int32_t vini,scriptlen,activescriptlen,errs = 0; cJSON *spendscript,*item; for (vini=0; vini 0 ) @@ -1276,8 +1276,6 @@ int32_t iguana_interpreter(struct iguana_info *coin,cJSON *logarray,int64_t nLoc } else if ( scriptlen != activescriptlen || memcmp(script,activescript,scriptlen) != 0 ) { - for (i=0; i= 0 ) {