Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ec50b407a6
  1. 4
      iguana/iguana_unspents.c

4
iguana/iguana_unspents.c

@ -30,7 +30,7 @@ struct iguana_hhutxo *iguana_hhutxofind(struct iguana_info *coin,uint64_t uval)
struct iguana_hhaccount *iguana_hhaccountfind(struct iguana_info *coin,uint64_t pval)
{
struct iguana_hhaccount *hhacct;
HASH_FIND(hh,coin->utxotable,&pval,sizeof(pval),hhacct);
HASH_FIND(hh,coin->accountstable,&pval,sizeof(pval),hhacct);
return(hhacct);
}
@ -87,7 +87,6 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,int16_t spent_hdrsi,uint32_t
memset(hhutxo,0,sizeof(*hhutxo));
hhutxo->uval = uval;
HASH_ADD_KEYPTR(hh,coin->utxotable,&hhutxo->uval,sizeof(hhutxo->uval),hhutxo);
//HASH_ADD(hh,coin->utxotable,uval,sizeof(uval),hhutxo);
if ( (hhacct= iguana_hhaccountfind(coin,pval)) == 0 )
{
if ( numHHACCT+1 >= maxHHACCT )
@ -99,7 +98,6 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,int16_t spent_hdrsi,uint32_t
memset(hhacct,0,sizeof(*hhacct));
hhacct->pval = pval;
HASH_ADD_KEYPTR(hh,coin->accountstable,&hhacct->pval,sizeof(hhacct->pval),hhacct);
//HASH_ADD(hh,coin->accountstable,pval,sizeof(pval),hhacct);
}
//printf("create hhutxo.%p hhacct.%p from.%d\n",hhutxo,hhacct,fromheight);
hhutxo->u.spentflag = 1;

Loading…
Cancel
Save