Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
0326a8d3c9
  1. 1
      iguana/iguana_realtime.c
  2. 6
      iguana/iguana_spendvectors.c
  3. 2
      iguana/iguana_unspents.c

1
iguana/iguana_realtime.c

@ -190,6 +190,7 @@ void iguana_RTspendvectors(struct supernet_info *myinfo,struct iguana_info *coin
num += iguana_convert(coin,IGUANA_NUMHELPERS,coin->bundles[hdrsi],1,orignumemit);
}
//printf("RTspendvectors converted.%d to %d\n",num,coin->RTheight);
bp->ramchain = coin->RTramchain;
bp->converted = (uint32_t)time(NULL);
if ( iguana_balancegen(coin,1,bp,coin->RTstarti,coin->RTheight > 0 ? coin->RTheight-1 : bp->n-1,orignumemit) < 0 )
{

6
iguana/iguana_spendvectors.c

@ -521,14 +521,10 @@ int32_t iguana_balancegen(struct iguana_info *coin,int32_t incremental,struct ig
{
spent_unspentind = T[s->spendtxidind].firstvout + s->prevout;
spentU = RAMCHAIN_PTR(rdata,Uoffset);
//spentU = (void *)(long)((long)rdata + rdata->Uoffset);
u = &spentU[spent_unspentind];
if ( (spent_pkind= u->pkind) != 0 && spent_pkind < rdata->numpkinds )
spent_value = u->value;
/*found spend d9151... txidind.1083097 [202] s3163977
//found spend d9151... txidind.1083097 [202] s4033628
if ( spent_hdrsi == 202 && (spendind == 3163977 || spendind == 4033628) )
printf("internal spend.%d spendtxidind.%d 1st.%d U.(prevout.%d u%u pkind.%u %.8f)\n",spendind,txidind,T[s->spendtxidind].firstvout,s->prevout,spent_unspentind,u->pkind,dstr(u->value));*/
// printf("internal spend.%d spendtxidind.%d 1st.%d U.(prevout.%d u%u pkind.%u %.8f)\n",spendind,txidind,T[s->spendtxidind].firstvout,s->prevout,spent_unspentind,u->pkind,dstr(u->value));*/
}
else //if ( i > 0 || j > 0 || k > 0 )
{

2
iguana/iguana_unspents.c

@ -312,7 +312,7 @@ struct iguana_pkhash *iguana_pkhashfind(struct iguana_info *coin,struct iguana_r
printf("iguana_pkhashfind: unexpected access when RTramchain_busy\n");
return(0);
}
ramchain = (bp != coin->current) ? &bp->ramchain : &coin->RTramchain;
ramchain = &bp->ramchain;//(bp != coin->current) ? &bp->ramchain : &coin->RTramchain;
if ( (rdata= ramchain->H.data) != 0 )
{
numpkinds = rdata->numpkinds;

Loading…
Cancel
Save