Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
acafe120fd
  1. 8
      iguana/iguana_realtime.c
  2. 4
      iguana/iguana_unspents.c

8
iguana/iguana_realtime.c

@ -18,7 +18,7 @@
void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp) void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp)
{ {
int32_t hdrsi; int32_t hdrsi;
//portable_mutex_lock(&coin->RTmutex); portable_mutex_lock(&coin->RTmutex);
if ( coin->utxotable != 0 ) if ( coin->utxotable != 0 )
{ {
printf("free RTramchain\n"); printf("free RTramchain\n");
@ -40,7 +40,7 @@ void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp)
coin->RTdatabad = 0; coin->RTdatabad = 0;
printf("done RTramchain\n"); printf("done RTramchain\n");
} }
//portable_mutex_unlock(&coin->RTmutex); portable_mutex_unlock(&coin->RTmutex);
} }
void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block) void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block)
@ -69,7 +69,7 @@ void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,
void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_bundle *bp) void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_bundle *bp)
{ {
uint32_t i,changed = 0; struct iguana_ramchaindata *rdata; struct iguana_ramchain *dest = &coin->RTramchain; struct iguana_blockRO *B; struct iguana_bundle *tmpbp; uint32_t i,changed = 0; struct iguana_ramchaindata *rdata; struct iguana_ramchain *dest = &coin->RTramchain; struct iguana_blockRO *B; struct iguana_bundle *tmpbp;
//portable_mutex_lock(&coin->RTmutex); portable_mutex_lock(&coin->RTmutex);
if ( (rdata= dest->H.data) != 0 ) if ( (rdata= dest->H.data) != 0 )
{ {
i = 0; i = 0;
@ -111,7 +111,7 @@ void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_b
sleep(1); sleep(1);
} }
} }
//portable_mutex_unlock(&coin->RTmutex); portable_mutex_unlock(&coin->RTmutex);
} }
void iguana_rdataset(struct iguana_ramchain *dest,struct iguana_ramchaindata *rdest,struct iguana_ramchain *src) void iguana_rdataset(struct iguana_ramchain *dest,struct iguana_ramchaindata *rdest,struct iguana_ramchain *src)

4
iguana/iguana_unspents.c

@ -98,7 +98,7 @@ int32_t iguana_unspentind2txid(struct supernet_info *myinfo,struct iguana_info *
int32_t iguana_unspentindfind(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,uint8_t *spendscript,int32_t *spendlenp,uint64_t *valuep,int32_t *heightp,bits256 txid,int32_t vout,int32_t lasthdrsi,int32_t mempool) int32_t iguana_unspentindfind(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,uint8_t *spendscript,int32_t *spendlenp,uint64_t *valuep,int32_t *heightp,bits256 txid,int32_t vout,int32_t lasthdrsi,int32_t mempool)
{ {
struct iguana_txid *tp,TX; struct gecko_memtx *memtx; struct iguana_pkhash *P; struct iguana_unspent *U; struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int64_t RTspend; int64_t value; int32_t pkind,hdrsi,firstvout,spentheight,flag=0,unspentind = -1; struct iguana_txid *tp,TX; struct gecko_memtx *memtx; struct iguana_pkhash *P; struct iguana_unspent *U; struct iguana_bundle *bp; struct iguana_ramchaindata *rdata; int64_t RTspend; int64_t value; int32_t pkind,hdrsi,firstvout,spentheight,flag=0,unspentind = -1;
//portable_mutex_lock(&coin->RTmutex); portable_mutex_lock(&coin->RTmutex);
if ( valuep != 0 ) if ( valuep != 0 )
*valuep = 0; *valuep = 0;
if ( coinaddr != 0 ) if ( coinaddr != 0 )
@ -143,7 +143,7 @@ int32_t iguana_unspentindfind(struct supernet_info *myinfo,struct iguana_info *c
} }
} }
} }
//portable_mutex_unlock(&coin->RTmutex); portable_mutex_unlock(&coin->RTmutex);
return(unspentind); return(unspentind);
} }

Loading…
Cancel
Save