Browse Source

Generate Predeemscript

patch-3
jl777 7 years ago
parent
commit
380aec4f7b
  1. 7
      iguana/exchanges/LP_remember.c

7
iguana/exchanges/LP_remember.c

@ -1201,9 +1201,10 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
rev.bytes[j] = rswap.privAm.bytes[31 - j]; rev.bytes[j] = rswap.privAm.bytes[31 - j];
//revcalc_rmd160_sha256(secretAm,rev);//privAm); //revcalc_rmd160_sha256(secretAm,rev);//privAm);
//vcalc_sha256(0,secretAm256,rev.bytes,sizeof(rev)); //vcalc_sha256(0,secretAm256,rev.bytes,sizeof(rev));
if ( rswap.Predeemlen != 0 ) //if ( rswap.Predeemlen != 0 )
redeemlen = rswap.Predeemlen, memcpy(redeemscript,rswap.Predeemscript,rswap.Predeemlen); // redeemlen = rswap.Predeemlen, memcpy(redeemscript,rswap.Predeemscript,rswap.Predeemlen);
else redeemlen = basilisk_swap_bobredeemscript(0,&secretstart,redeemscript,rswap.plocktime,rswap.pubA0,rswap.pubB0,rswap.pubB1,rev,rswap.privBn,rswap.secretAm,rswap.secretAm256,rswap.secretBn,rswap.secretBn256); //else
redeemlen = basilisk_swap_bobredeemscript(0,&secretstart,redeemscript,rswap.plocktime,rswap.pubA0,rswap.pubB0,rswap.pubB1,rev,rswap.privBn,rswap.secretAm,rswap.secretAm256,rswap.secretBn,rswap.secretBn256);
len = basilisk_swapuserdata(userdata,rev,0,rswap.myprivs[0],redeemscript,redeemlen); len = basilisk_swapuserdata(userdata,rev,0,rswap.myprivs[0],redeemscript,redeemlen);
{ {
char privaddr[64]; uint8_t privpub33[33]; char privaddr[64]; uint8_t privpub33[33];

Loading…
Cancel
Save