Browse Source

Test

etomic
jl777 7 years ago
parent
commit
627b183ffb
  1. 10
      iguana/exchanges/LP_transaction.c

10
iguana/exchanges/LP_transaction.c

@ -437,14 +437,14 @@ int32_t bitcoin_verifyvins(void *ctx,char *symbol,uint8_t taddr,uint8_t pubtype,
bitcoin_pubkey33(ctx,vp->signers[j].pubkey,vp->signers[j].privkey); bitcoin_pubkey33(ctx,vp->signers[j].pubkey,vp->signers[j].privkey);
sig[siglen++] = sighash; sig[siglen++] = sighash;
vp->signers[j].siglen = siglen; vp->signers[j].siglen = siglen;
/*char str[65]; printf("SIGTXID.(%s) ",bits256_str(str,sigtxid)); char str[65]; printf("SIGTXID.(%s) ",bits256_str(str,sigtxid));
int32_t i; for (i=0; i<siglen; i++) int32_t i; for (i=0; i<siglen; i++)
printf("%02x",sig[i]); printf("%02x",sig[i]);
printf(" sig, "); printf(" sig, ");
for (i=0; i<plen; i++) for (i=0; i<33; i++)
printf("%02x",vp->signers[j].pubkey[i]); printf("%02x",vp->signers[j].pubkey[i]);
// s2 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1; // s2 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1;
printf(" SIGNEDTX.[%02x] siglen.%d priv.%s\n",sig[siglen-1],siglen,bits256_str(str,vp->signers[j].privkey));*/ printf(" SIGNEDTX.[%02x] siglen.%d priv.%s\n",sig[siglen-1],siglen,bits256_str(str,vp->signers[j].privkey));
} }
if ( sig == 0 || siglen == 0 ) if ( sig == 0 || siglen == 0 )
{ {
@ -462,14 +462,14 @@ int32_t bitcoin_verifyvins(void *ctx,char *symbol,uint8_t taddr,uint8_t pubtype,
{ {
flag++; flag++;
numsigs++; numsigs++;
/*int32_t z; char tmpaddr[64]; 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]);
bitcoin_address(tmpaddr,0,0,vp->signers[j].pubkey,33); bitcoin_address(tmpaddr,0,0,vp->signers[j].pubkey,33);
printf(" <- pub, SIG.%d.%d VERIFIED numsigs.%d vs M.%d %s\n",vini,j,numsigs,vp->M,tmpaddr);*/ 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