Browse Source

Test

etomic
jl777 7 years ago
parent
commit
42d106adea
  1. 20
      iguana/exchanges/LP_bitcoin.c

20
iguana/exchanges/LP_bitcoin.c

@ -3397,27 +3397,25 @@ bits256 bitcoin_sigtxid(char *symbol,uint8_t taddr,uint8_t pubtype,uint8_t p2sht
printf("outputhash.%s ",bits256_str(str,outputhash));
printf("vini.%d prev.%s/v%d\n",vini,bits256_str(str,dest.vins[vini].prev_hash),dest.vins[vini].prev_vout);
/*01000000
997c1040c67ee2f9ab21abf7457f7aecec7a7f45f7ab21abf9e27ec640107c99
445066705e799022b7095f7ceca255141455a2ec7c5f09b72290795e70665044
10b365ea6b8a9f2d56dc12de868e382dc787b2e29355f9b357dcf764c5e29cb101000000
76a91459fdba29ea85c65ad90f6d38f7a6646476b26b1688ac
997c1040c67ee2f9ab21abf7457f7aec4503970e974e532b6578f326c270b7eb
445066705e799022b7095f7ceca255149f43acfc47e7f59e551f7bce2930b13b
b19ce2c564f7dc57b3f95593e2b287c72d388e86de12dc562d9f8a6bea65b310 01000000
1976a91459fdba29ea85c65ad90f6d38f7a6646476b26b1688ac
5be9290000000000
ffffffff
a919fd9f636c08f4989be95c99923040403092995ce99b98f4086c639ffd19a9
a919fd9f636c08f4989be95c999230408dbc0f602c3f000bcedba9d5bbe98914
00000000
41000000*/
len = 0;
len += iguana_rwnum(1,&serialized[len],sizeof(dest.version),&dest.version);
for (i=0; i<32; i++)
serialized[len++] = prevouthash.bytes[i];
//len += iguana_rwbignum(1,&serialized[len],sizeof(prevouthash),prevouthash.bytes);
//len += iguana_rwbignum(1,&serialized[len],sizeof(seqhash),seqhash.bytes);
for (i=0; i<32; i++)
serialized[len++] = seqhash.bytes[i];
prevhash = dest.vins[vini].prev_hash;
for (i=0; i<32; i++)
serialized[len++] = prevhash.bytes[i];
//len += iguana_rwbignum(1,&serialized[len],sizeof(dest.vins[vini].prev_hash),dest.vins[vini].prev_hash.bytes);
//prevhash = dest.vins[vini].prev_hash;
//for (i=0; i<32; i++)
// serialized[len++] = prevhash.bytes[i];
len += iguana_rwbignum(1,&serialized[len],sizeof(dest.vins[vini].prev_hash),dest.vins[vini].prev_hash.bytes);
len += iguana_rwnum(1,&serialized[len],sizeof(dest.vins[vini].prev_vout),&dest.vins[vini].prev_vout);
serialized[len++] = spendlen;
memcpy(&serialized[len],spendscript,spendlen), len += spendlen;

Loading…
Cancel
Save