Browse Source

Test

etomic
jl777 7 years ago
parent
commit
af77064fc2
  1. 14
      iguana/exchanges/LP_bitcoin.c

14
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);
@ -3352,7 +3352,7 @@ bits256 bitcoin_sigtxid(char *symbol,uint8_t taddr,uint8_t pubtype,uint8_t p2sht
len += iguana_rwbignum(1,&serialized[len],sizeof(outputhash),outputhash.bytes);
len += iguana_rwnum(1,&serialized[len],sizeof(dest.lock_time),&dest.lock_time);
len += iguana_rwnum(1,&serialized[len],sizeof(hashtype),&hashtype);
printf("B path\n");
printf("B path spendamount %.8f\n",dstr(spendamount));
}
revsigtxid = bits256_doublesha256(0,serialized,len);
for (i=0; i<sizeof(revsigtxid); i++)

Loading…
Cancel
Save