Browse Source

-prints

patch-3
jl777 7 years ago
parent
commit
7e67f09ab2
  1. 4
      iguana/exchanges/LP_remember.c
  2. 12
      iguana/exchanges/LP_transaction.c

4
iguana/exchanges/LP_remember.c

@ -894,7 +894,7 @@ int32_t LP_swap_load(struct LP_swap_remember *rswap,int32_t forceflag)
{ {
rswap->Predeemlen >>= 1; rswap->Predeemlen >>= 1;
decode_hex(rswap->Predeemscript,rswap->Predeemlen,rstr); decode_hex(rswap->Predeemscript,rswap->Predeemlen,rstr);
printf("%p Predeemscript.(%s)\n",rswap->Predeemscript,rstr); //printf("%p Predeemscript.(%s)\n",rswap->Predeemscript,rstr);
} }
else if ( strcmp(txnames[i],"bobdeposit") == 0 && (rstr= jstr(txobj,"redeem")) != 0 && (rswap->Dredeemlen= is_hexstr(rstr,0)) > 0 ) else if ( strcmp(txnames[i],"bobdeposit") == 0 && (rstr= jstr(txobj,"redeem")) != 0 && (rswap->Dredeemlen= is_hexstr(rstr,0)) > 0 )
{ {
@ -1205,7 +1205,7 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
{ {
if ( rswap.Predeemlen != redeemlen || memcmp(redeemscript,rswap.Predeemscript,redeemlen) != 0 ) if ( rswap.Predeemlen != redeemlen || memcmp(redeemscript,rswap.Predeemscript,redeemlen) != 0 )
printf("Predeemscript error len %d vs %d, cmp.%d\n",rswap.Predeemlen,redeemlen,memcmp(redeemscript,rswap.Predeemscript,redeemlen)); printf("Predeemscript error len %d vs %d, cmp.%d\n",rswap.Predeemlen,redeemlen,memcmp(redeemscript,rswap.Predeemscript,redeemlen));
else printf("Predeem matches\n"); //else printf("Predeem matches\n");
} else printf("%p Predeemscript missing\n",rswap.Predeemscript); } else printf("%p Predeemscript missing\n",rswap.Predeemscript);
len = basilisk_swapuserdata(userdata,rev,0,rswap.myprivs[0],redeemscript,redeemlen); len = basilisk_swapuserdata(userdata,rev,0,rswap.myprivs[0],redeemscript,redeemlen);
if ( 0 ) if ( 0 )

12
iguana/exchanges/LP_transaction.c

@ -1774,9 +1774,9 @@ int32_t basilisk_swap_bobredeemscript(int32_t depositflag,int32_t *secretstartp,
n = bitcoin_checklocktimeverify(redeemscript,n,locktime); n = bitcoin_checklocktimeverify(redeemscript,n,locktime);
if ( depositflag != 0 ) if ( depositflag != 0 )
{ {
for (i=0; i<20; i++) //for (i=0; i<20; i++)
printf("%02x",secretAm[i]); // printf("%02x",secretAm[i]);
printf(" <- secretAm depositflag.%d nonz.%d\n",depositflag,bits256_nonz(privkey)); //printf(" <- secretAm depositflag.%d nonz.%d\n",depositflag,bits256_nonz(privkey));
n = bitcoin_secret160verify(redeemscript,n,secretAm); n = bitcoin_secret160verify(redeemscript,n,secretAm);
} }
n = bitcoin_pubkeyspend(redeemscript,n,pubkeyA); n = bitcoin_pubkeyspend(redeemscript,n,pubkeyA);
@ -1817,9 +1817,9 @@ int32_t basilisk_bobscript(uint8_t *rmd160,uint8_t *redeemscript,int32_t *redeem
{ {
calc_rmd160_sha256(rmd160,redeemscript,n); calc_rmd160_sha256(rmd160,redeemscript,n);
n = bitcoin_p2shspend(script,0,rmd160); n = bitcoin_p2shspend(script,0,rmd160);
int32_t i; for (i=0; i<*redeemlenp; i++) //int32_t i; for (i=0; i<*redeemlenp; i++)
printf("%02x",redeemscript[i]); // printf("%02x",redeemscript[i]);
printf(" <- redeem.%d bobtx dflag.%d spendscript.[%d]\n",*redeemlenp,depositflag,n); //printf(" <- redeem.%d bobtx dflag.%d spendscript.[%d]\n",*redeemlenp,depositflag,n);
} }
return(n); return(n);
} }

Loading…
Cancel
Save