Browse Source

Test

etomic
jl777 8 years ago
parent
commit
88e13effa7
  1. 2
      iguana/exchanges/LP_remember.c
  2. 5
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_remember.c

@ -754,7 +754,7 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
//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));
redeemlen = basilisk_swap_bobredeemscript(0,&secretstart,redeemscript,plocktime,pubA0,pubB0,pubB1,rev,privBn,secretAm,secretAm256,secretBn,secretBn256); redeemlen = basilisk_swap_bobredeemscript(0,&secretstart,redeemscript,plocktime,pubA0,pubB0,pubB1,rev,privBn,secretAm,secretAm256,secretBn,secretBn256);
len = basilisk_swapuserdata(userdata,privAm/*rev*/,0,myprivs[0],redeemscript,redeemlen); len = basilisk_swapuserdata(userdata,rev,0,myprivs[0],redeemscript,redeemlen);
{ {
char privaddr[64]; uint8_t privpub33[33]; char privaddr[64]; uint8_t privpub33[33];
bitcoin_pubkey33(ctx,privpub33,myprivs[0]); bitcoin_pubkey33(ctx,privpub33,myprivs[0]);

5
iguana/exchanges/LP_transaction.c

@ -426,13 +426,14 @@ int32_t bitcoin_verifyvins(void *ctx,char *symbol,uint8_t pubtype,uint8_t p2shty
{ {
flag++; flag++;
numsigs++; numsigs++;
int32_t z; int32_t z; char tmpaddr[64];
for (z=0; z<siglen-1; z++) for (z=0; z<siglen-1; z++)
printf("%02x",sig[z]); printf("%02x",sig[z]);
printf(" <- sig[%d]\n",j); printf(" <- sig[%d]\n",j);
for (z=0; z<33; z++) for (z=0; z<33; z++)
printf("%02x",vp->signers[j].pubkey[z]); printf("%02x",vp->signers[j].pubkey[z]);
printf(" <- pub, SIG.%d.%d VERIFIED numsigs.%d vs M.%d\n",vini,j,numsigs,vp->M); bitcoin_address(tmpaddr,60,vp->signers[j].pubkey,33);
printf(" <- pub, SIG.%d.%d VERIFIED numsigs.%d vs M.%d %s\n",vini,j,numsigs,vp->M,tmpaddr);
} }
} }
if ( numsigs >= vp->M ) if ( numsigs >= vp->M )

Loading…
Cancel
Save