jl777 8 years ago
parent
commit
46f12692e2
  1. 2
      iguana/iguana_interpreter.c
  2. 8
      iguana/iguana_scripts.c

2
iguana/iguana_interpreter.c

@ -1357,7 +1357,7 @@ int32_t bitcoin_assembler(struct iguana_info *coin,cJSON *logarray,uint8_t scrip
printf("%02x",revrmd160[i]);
}
printf(" <- rev OP_HASH160\n");
iguana_pushdata(stacks,0,revrmd160,sizeof(rmd160));
iguana_pushdata(stacks,0,rmd160,sizeof(rmd160));
break;
case IGUANA_OP_SHA256:
vcalc_sha256(0,hash.bytes,databuf,datalen);

8
iguana/iguana_scripts.c

@ -36,12 +36,12 @@ int32_t bitcoin_p2shspend(uint8_t *script,int32_t n,uint8_t rmd160[20])
int32_t bitcoin_revealsecret160(uint8_t *script,int32_t n,uint8_t secret160[20])
{
//int32_t i;
int32_t i;
script[n++] = SCRIPT_OP_HASH160;
script[n++] = 0x14;
//for (i=0; i<20; i++)
// script[n+i] = secret160[19-i];
memcpy(&script[n],secret160,0x14);
for (i=0; i<20; i++)
script[n+i] = secret160[19-i];
///memcpy(&script[n],secret160,0x14);
n += 0x14;
script[n++] = SCRIPT_OP_EQUALVERIFY;
return(n);

Loading…
Cancel
Save