jl777 8 years ago
parent
commit
0e1a9cabc5
  1. 6
      basilisk/basilisk_swap.c
  2. 4
      iguana/iguana_sign.c

6
basilisk/basilisk_swap.c

@ -171,12 +171,12 @@ int32_t basilisk_bobscript(uint8_t *rmd160,uint8_t *redeemscript,int32_t *redeem
*secretstartp = n + 2;
if ( 1 )
{
if ( 0 && bits256_nonz(privkey) != 0 )
if ( 1 && bits256_nonz(privkey) != 0 )
{
uint8_t bufA[20],bufB[20];
revcalc_rmd160_sha256(bufA,privkey);
calc_rmd160_sha256(bufB,privkey.bytes,sizeof(privkey));
if ( memcmp(bufA,secret160,sizeof(bufA)) == 0 )
/*if ( memcmp(bufA,secret160,sizeof(bufA)) == 0 )
printf("MATCHES BUFA\n");
else if ( memcmp(bufB,secret160,sizeof(bufB)) == 0 )
printf("MATCHES BUFB\n");
@ -186,7 +186,7 @@ int32_t basilisk_bobscript(uint8_t *rmd160,uint8_t *redeemscript,int32_t *redeem
printf(" <- revcalc\n");
for (i=0; i<20; i++)
printf("%02x",bufB[i]);
printf(" <- calc\n");
printf(" <- calc\n");*/
memcpy(secret160,bufB,20);
}
n = bitcoin_secret160verify(redeemscript,n,secret160);

4
iguana/iguana_sign.c

@ -1300,11 +1300,11 @@ int32_t iguana_interpreter(struct iguana_info *coin,cJSON *logarray,int64_t nLoc
jaddstr(item,"error","script reconstruction failed");
}
init_hexbytes_noT(str,activescript,activescriptlen);
printf("activescript.(%s)\n",str);
//printf("activescript.(%s)\n",str);
if ( logarray != 0 )
jaddstr(item,"original",str);
init_hexbytes_noT(str,script,scriptlen);
printf("reconstructed.(%s)\n",str);
//printf("reconstructed.(%s)\n",str);
if ( logarray != 0 )
{
jaddstr(item,"reconstructed",str);

Loading…
Cancel
Save