Browse Source

test

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

4
iguana/iguana_realtime.c

@ -527,14 +527,14 @@ void *iguana_RTrawdata(struct iguana_info *coin,bits256 hash2,uint8_t *data,int3
{
memcpy(&checklen,ptr,sizeof(checklen));
memcpy(&checknumtx,&ptr[sizeof(checklen)],sizeof(checknumtx));
if ( checklen == (int32_t)(filesize - sizeof(checklen)) && checknumtx == *numtxp )
if ( checklen == (int32_t)(filesize - sizeof(checklen) - sizeof(checknumtx)) && checknumtx == *numtxp )
{
for (i=nonz=0; i<checklen; i++)
if ( ptr[2*sizeof(checklen) + i] != 0 )
nonz++;
*recvlenp = (int32_t)(filesize - sizeof(checklen) - sizeof(checknumtx));
return(&ptr[sizeof(*recvlenp) + sizeof(checknumtx)]);
} else printf("checklen.%d vs %d\n",checklen,(int32_t)(filesize - sizeof(checklen)));
} else printf("checklen.%d vs %d\n",checklen,(int32_t)(filesize - sizeof(checklen) - sizeof(checknumtx)));
*numtxp = checknumtx;
}
}

4
iguana/iguana_unspents.c

@ -1181,10 +1181,10 @@ int64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *coi
sprintf(fname2,"%s/%s/utxoaddrs.%d",GLOBAL_DBDIR,coin->symbol,height), OS_portable_path(fname2);
if ( iguana_utxoaddr_map(coin,fname2) != 0 )
{
if ( strcmp("BTCD",coin->symbol) == 0 )
if ( strcmp("BTC",coin->symbol) != 0 )
errs = iguana_utxoaddr_validate(myinfo,coin,height);
printf("nogen %s HIST BALANCE %s %.8f errs %d\n",fname2,bits256_str(str,coin->utxoaddrhash),dstr(coin->histbalance),errs);
if ( coin->histbalance > 0 )
if ( errs == 0 && coin->histbalance > 0 )
{
coin->RTheight = height;
if ( (block= iguana_blockfind("utxogen",coin,coin->blocks.hwmchain.RO.hash2)) != 0 )

Loading…
Cancel
Save