diff --git a/iguana/iguana_interpreter.c b/iguana/iguana_interpreter.c index 73cfa7d20..a32e3f78d 100755 --- a/iguana/iguana_interpreter.c +++ b/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); diff --git a/iguana/iguana_scripts.c b/iguana/iguana_scripts.c index adcc507e5..87310a139 100755 --- a/iguana/iguana_scripts.c +++ b/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);