Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
516cb8ee2d
  1. 5
      iguana/iguana_realtime.c
  2. 7
      includes/iguana_funcs.h
  3. 4
      includes/iguana_structs.h

5
iguana/iguana_realtime.c

@ -489,10 +489,13 @@ void iguana_RTspend(struct iguana_info *coin,struct iguana_RTtxid *RTptr,struct
if ( RTptr != 0 )
{
if ( bits256_cmp(RTptr->txid,txid) == 0 )
{
if ( (spend= RTptr->spends[vini]) == 0 )
{
if ( polarity > 0 )
{
} else printf("iguana_RTspend missing vini.%d ptr\n",vini);
}
} else printf("iguana_RTspend txid mismatch %llx != %llx\n",(long long)RTptr->txid.txid,(long long)txid.txid);
} else printf("null rtptr? %s vini.%d spend.(%s/v%d) %lld\n",bits256_str(str,txid),vini,bits256_str(str2,prev_hash),prev_vout,(long long)polarity);
@ -533,7 +536,7 @@ struct iguana_RTtxid *iguana_RTtxid(struct iguana_info *coin,struct iguana_block
RTptr->numvins = numvins;
RTptr->locktime = locktime;
RTptr->version = version;
RTptr->timestamp timestamp;
RTptr->timestamp = timestamp;
RTptr->unspents = (void *)&RTptr->spends[numvins];
HASH_ADD_KEYPTR(hh,coin->RTdataset,RTptr->txid.bytes,sizeof(RTptr->txid),RTptr);
// add to hashtable block <-> txids[]

7
includes/iguana_funcs.h

@ -540,9 +540,10 @@ int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fil
struct iguana_peer *basilisk_ensurerelay(struct supernet_info *myinfo,struct iguana_info *btcd,uint32_t ipbits);
int32_t iguana_datachain_scan(struct supernet_info *myinfo,struct iguana_info *coin,uint8_t rmd160[20]);
int32_t iguana_RTramchaindata(struct iguana_info *coin,struct OS_memspace *TXDATA,struct OS_memspace *HASHMEM,int64_t polarity,struct iguana_block *block,struct iguana_msgtx *txarray,int32_t txn_count);
struct iguana_RTdata *iguana_RTtxid(struct iguana_info *coin,struct iguana_block *block,int64_t polarity,int32_t txn_count,bits256 txid,int32_t numvouts,int32_t numvins,uint32_t locktime,uint32_t version,uint32_t timestamp);
void iguana_RTspend(struct iguana_info *coin,struct iguana_RTdata *RTptr,struct iguana_block *block,int64_t polarity,uint8_t *script,int32_t scriptlen,bits256 txid,int32_t vini,bits256 prev_hash,int32_t prev_vout);
void iguana_RTunspent(struct iguana_info *coin,struct iguana_RTdata *RTptr,struct iguana_block *block,int64_t polarity,char *coinaddr,uint8_t *rmd160,int32_t type,uint8_t *script,int32_t scriptlen,bits256 txid,int32_t vout,int64_t value);
struct iguana_RTtxid *iguana_RTtxid(struct iguana_info *coin,struct iguana_block *block,int64_t polarity,int32_t txn_count,bits256 txid,int32_t numvouts,int32_t numvins,uint32_t locktime,uint32_t version,uint32_t timestamp);
void iguana_RTspend(struct iguana_info *coin,struct iguana_RTtxid *RTptr,struct iguana_block *block,int64_t polarity,uint8_t *script,int32_t scriptlen,bits256 txid,int32_t vini,bits256 prev_hash,int32_t prev_vout);
void iguana_RTunspent(struct iguana_info *coin,struct iguana_RTtxid *RTptr,struct iguana_block *block,int64_t polarity,char *coinaddr,uint8_t *rmd160,int32_t type,uint8_t *script,int32_t scriptlen,bits256 txid,int32_t vout,int64_t value);
void iguana_RTreset(struct iguana_info *coin);
void iguana_RTpurge(struct iguana_info *coin,int32_t lastheight);
void iguana_RTnewblock(struct iguana_info *coin,struct iguana_block *block);

4
includes/iguana_structs.h

@ -400,8 +400,8 @@ struct iguana_RTtxid
bits256 txid;
int32_t txn_count,numvouts,numvins;
uint32_t locktime,version,timestamp;
struct iguana_RTunspent *unspents;
struct iguana_RTspend spends[];
struct iguana_RTunspent **unspents;
struct iguana_RTspend *spends[];
};
struct iguana_info

Loading…
Cancel
Save