Browse Source

Test

etomic
jl777 7 years ago
parent
commit
952bcad94b
  1. 12
      iguana/exchanges/LP_bitcoin.c
  2. 2
      iguana/exchanges/LP_transaction.c

12
iguana/exchanges/LP_bitcoin.c

@ -3329,18 +3329,18 @@ bits256 bitcoin_sigtxid(char *symbol,uint8_t taddr,uint8_t pubtype,uint8_t p2sht
len += iguana_rwnum(1,&serialized[len],sizeof(dest.vins[i].prev_vout),&dest.vins[i].prev_vout);
}
prevouthash = bits256_doublesha256(0,serialized,len);
//for (i=0; i<sizeof(prevouthash); i++)
// prevouthash.bytes[31-i] = prevouthash.bytes[i];
for (i=0; i<sizeof(prevouthash); i++)
prevouthash.bytes[31-i] = prevouthash.bytes[i];
for (i=len=0; i<dest.tx_in; i++)
len += iguana_rwnum(1,&serialized[len],sizeof(dest.vins[i].sequence),&dest.vins[i].sequence);
seqhash = bits256_doublesha256(0,serialized,len);
//for (i=0; i<sizeof(seqhash); i++)
// seqhash.bytes[31-i] = seqhash.bytes[i];
for (i=0; i<sizeof(seqhash); i++)
seqhash.bytes[31-i] = seqhash.bytes[i];
for (i=len=0; i<dest.tx_out; i++)
len += iguana_voutparse(1,&serialized[len],&dest.vouts[i]);
outputhash = bits256_doublesha256(0,serialized,len);
//for (i=0; i<sizeof(outputhash); i++)
// outputhash.bytes[31-i] = outputhash.bytes[i];
for (i=0; i<sizeof(outputhash); i++)
outputhash.bytes[31-i] = outputhash.bytes[i];
len = 0;
len += iguana_rwnum(1,&serialized[len],sizeof(dest.version),&dest.version);
len += iguana_rwbignum(1,&serialized[len],sizeof(prevouthash),prevouthash.bytes);

2
iguana/exchanges/LP_transaction.c

@ -397,7 +397,7 @@ int32_t iguana_vininfo_create(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uin
int32_t bitcoin_verifyvins(void *ctx,char *symbol,uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uint8_t isPoS,int32_t height,bits256 *signedtxidp,char **signedtx,struct iguana_msgtx *msgtx,uint8_t *serialized,int32_t maxlen,struct vin_info *V,uint32_t sighash,int32_t signtx,int32_t suppress_pubkeys,int32_t zcash)
{
bits256 sigtxid; uint64_t spendamount; uint8_t *sig,*script; struct vin_info *vp; char vpnstr[64]; int32_t scriptlen,complete=0,j,vini=0,flag=0,siglen,numvouts,numsigs;
bits256 sigtxid; uint8_t *sig,*script; struct vin_info *vp; char vpnstr[64]; int32_t scriptlen,complete=0,j,vini=0,flag=0,siglen,numvouts,numsigs;
numvouts = msgtx->tx_out;
vpnstr[0] = 0;
*signedtx = 0;

Loading…
Cancel
Save