Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
57707f6bf0
  1. 2
      iguana/iguana_realtime.c
  2. 12
      iguana/iguana_unspents.c

2
iguana/iguana_realtime.c

@ -283,7 +283,7 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info *
bp->lastRT = (uint32_t)time(NULL);
iguana_RTramchainalloc("RTbundle",coin,bp);
bp->isRT = 1;
//printf("RTheight.%d hwm.%d\n",coin->RTheight,coin->blocks.hwmchain.height);
printf("%s rdata.%p RTheight.%d hwm.%d RTdatabad.%d\n",coin->symbol,coin->RTramchain.H.data,coin->RTheight,coin->blocks.hwmchain.height,coin->RTdatabad);
while ( (rdata= coin->RTramchain.H.data) != 0 && coin->RTheight <= coin->blocks.hwmchain.height-offset && coin->RTdatabad == 0 )
{
dest = &coin->RTramchain;

12
iguana/iguana_unspents.c

@ -328,11 +328,9 @@ struct iguana_pkhash *iguana_pkhashfind(struct iguana_info *coin,struct iguana_r
if ( P != 0 )
*p = P[pkind];
return(p);
}
else if ( pkind != 0 )
} else if ( pkind != 0 )
printf("[%d] not found pkind.%d vs num.%d RT.%d rdata.%p\n",i,pkind,rdata->numpkinds,bp->isRT,rdata);
}
else if ( coin->spendvectorsaved > 1 && bp != coin->current )
} else if ( coin->spendvectorsaved > 1 && bp != coin->current )
printf("%s.[%d] skip null rdata isRT.%d\n",coin->symbol,i,bp->isRT);
}
}
@ -526,10 +524,10 @@ int32_t iguana_pkhasharray(struct supernet_info *myinfo,struct iguana_info *coin
int64_t iguana_unspents(struct supernet_info *myinfo,struct iguana_info *coin,cJSON *array,int32_t minconf,int32_t maxconf,uint8_t *rmdarray,int32_t numrmds,int32_t lastheight,int64_t *unspents,int32_t *numunspentsp,char *remoteaddr)
{
int64_t total=0,sum=0; struct iguana_pkhash *P; uint8_t *addrtypes,*pubkeys; int32_t i,numunspents,maxunspents,flag = 0; char coinaddr[64];
if ( 0 && coin->RTramchain_busy != 0 )
while ( coin->RTramchain_busy != 0 )
{
printf("iguana_pkhasharray: unexpected access when RTramchain_busy\n");
return(sum);
fprintf(stderr,"iguana_pkhasharray: unexpected access when RTramchain_busy\n");
sleep(3);
}
numunspents = 0;
maxunspents = *numunspentsp;

Loading…
Cancel
Save