Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
bfe57a51f2
  1. 6
      iguana/iguana_realtime.c
  2. 8
      iguana/iguana_unspents.c
  3. 2
      includes/iguana_funcs.h

6
iguana/iguana_realtime.c

@ -648,12 +648,6 @@ void iguana_RTnewblock(struct iguana_info *coin,struct iguana_block *block)
{
if ( block->height > coin->lastRTheight )
{
if ( coin->firstRTheight == 0 )
{
coin->firstRTheight = coin->RTheight;
iguana_RTreset(coin);
iguana_RTpurge(coin,coin->firstRTheight);
}
n = (block->height - coin->RTheight) + 1;
for (i=0; i<n; i++)
{

8
iguana/iguana_unspents.c

@ -1187,7 +1187,9 @@ int64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *coi
printf("nogen %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs);
if ( errs == 0 && coin->histbalance > 0 )
{
coin->RTheight = height;
coin->firstRTheight = coin->RTheight = height;
iguana_RTreset(coin);
iguana_RTpurge(coin,coin->firstRTheight);
if ( (block= iguana_blockfind("utxogen",coin,coin->blocks.hwmchain.RO.hash2)) != 0 )
iguana_RTnewblock(coin,block);
return(coin->histbalance);
@ -1314,7 +1316,9 @@ continue;
}
else
{
coin->RTheight = height;
coin->firstRTheight = coin->RTheight = height;
iguana_RTreset(coin);
iguana_RTpurge(coin,coin->firstRTheight);
if ( (block= iguana_blockfind("utxogen",coin,coin->blocks.hwmchain.RO.hash2)) != 0 )
iguana_RTnewblock(coin,block);
return(coin->histbalance);

2
includes/iguana_funcs.h

@ -543,6 +543,8 @@ int32_t iguana_RTramchaindata(struct iguana_info *coin,struct OS_memspace *TXDAT
void iguana_RTtxid(struct iguana_info *coin,struct iguana_block *block,int64_t polarity,int32_t txi,int32_t txn_count,bits256 txid,int32_t numvouts,int32_t numvins,uint32_t locktime,uint32_t version,uint32_t timestamp,void *unspents,void *spends);
void iguana_RTspend(struct iguana_info *coin,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_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);
void *iguana_RTrawdata(struct iguana_info *coin,bits256 hash2,uint8_t *data,int32_t *recvlenp,int32_t *numtxp);
void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_bundle *bp);

Loading…
Cancel
Save