jl777 8 years ago
parent
commit
f8b76598e7
  1. 4
      iguana/iguana_interpreter.c
  2. 2
      iguana/iguana_sign.c
  3. 1
      includes/iguana_funcs.h

4
iguana/iguana_interpreter.c

@ -1349,7 +1349,9 @@ int32_t bitcoin_assembler(struct iguana_info *coin,cJSON *logarray,uint8_t scrip
iguana_pushdata(stacks,0,rmd160,sizeof(rmd160));
break;
case IGUANA_OP_HASH160:
calc_rmd160_sha256(rmd160,databuf,datalen);
if ( datalen == 32 )
revcalc_rmd160_sha256(rmd160,*(bits256 *)databuf);
else calc_rmd160_sha256(rmd160,databuf,datalen);
iguana_pushdata(stacks,0,rmd160,sizeof(rmd160));
break;
case IGUANA_OP_SHA256:

2
iguana/iguana_sign.c

@ -1286,7 +1286,7 @@ int32_t iguana_interpreter(struct iguana_info *coin,cJSON *logarray,int64_t nLoc
jaddstr(item,"reconstructed",str);
jaddi(logarray,item);
} else printf(" scriptlen mismatch.%d vs %d or miscompare\n",scriptlen,activescriptlen);
errs++;
//errs++;
}
}
if ( errs != 0 )

1
includes/iguana_funcs.h

@ -418,6 +418,7 @@ int32_t iguana_unspentindfind(struct supernet_info *myinfo,struct iguana_info *c
int32_t iguana_RTunspentindfind(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_outpoint *outpt,char *coinaddr,uint8_t *spendscript,int32_t *scriptlenp,uint64_t *valuep,int32_t *heightp,bits256 txid,int32_t vout,int32_t lasthdrsi,int32_t mempool);
int32_t iguana_addressvalidate(struct iguana_info *coin,uint8_t *addrtypep,char *address);
int32_t bitcoin_sign(void *ctx,char *symbol,uint8_t *sig,bits256 txhash2,bits256 privkey,int32_t recoverflag);
void revcalc_rmd160_sha256(uint8_t rmd160[20],bits256 revhash);
struct iguana_utxo iguana_utxofind(struct iguana_info *coin,struct iguana_outpoint spentpt,int32_t *RTspendflagp,int32_t lockflag);
bits256 iguana_str2priv(struct supernet_info *myinfo,struct iguana_info *coin,char *str);
int32_t iguana_RTspentflag(struct supernet_info *myinfo,struct iguana_info *coin,uint64_t *RTspendp,int32_t *spentheightp,struct iguana_ramchain *ramchain,struct iguana_outpoint spentpt,int32_t height,int32_t minconf,int32_t maxconf,uint64_t amount);

Loading…
Cancel
Save