Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
8e8bb9b3e3
  1. 6
      iguana/iguana_ramchain.c
  2. 2
      iguana/iguana_unspents.c

6
iguana/iguana_ramchain.c

@ -1637,7 +1637,7 @@ int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain
}
if ( dest != 0 )
_iguana_ramchain_setptrs(RAMCHAIN_DESTPTRS,dest->H.data);
//else fprintf(stderr,"iterate %d/%d dest.%p ramchain.%p rdata.%p\n",bp->bundleheight,bp->n,dest,ramchain,rdata);
fprintf(stderr,"iterate %d/%d dest.%p ramchain.%p rdata.%p\n",bp->bundleheight,bp->n,dest,ramchain,rdata);
_iguana_ramchain_setptrs(RAMCHAIN_PTRS,ramchain->H.data);
ramchain->H.ROflag = 1;
ramchain->H.unspentind = ramchain->H.spendind = ramchain->pkind = rdata->firsti;
@ -1651,7 +1651,7 @@ int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain
for (ramchain->H.txidind=rdata->firsti; ramchain->H.txidind<rdata->numtxids; ramchain->H.txidind++)
{
if ( 0 && ramchain->expanded == 0 && dest != 0 )
printf("ITER TXID.%d -> dest.%p desttxid.%d dest->hashmem.%p numtxids.%d\n",ramchain->H.txidind,dest,dest!=0?dest->H.txidind:0,dest!=0?dest->hashmem:0,rdata->numtxids);
printf("ITER [%d] TXID.%d -> dest.%p desttxid.%d dest->hashmem.%p numtxids.%d\n",ramchain->H.data->height,ramchain->H.txidind,dest,dest!=0?dest->H.txidind:0,dest!=0?dest->hashmem:0,rdata->numtxids);
tx = &T[ramchain->H.txidind];
if ( iguana_ramchain_addtxid(coin,RAMCHAIN_ARG,tx->txid,tx->numvouts,tx->numvins,tx->locktime,tx->version,tx->timestamp) == 0 )
return(-1);
@ -1659,7 +1659,7 @@ int32_t iguana_ramchain_iterate(struct iguana_info *coin,struct iguana_ramchain
{
char str[65];
//if ( 0 && ramchain->expanded == 0 )
printf("add hdrsi.%d dest.%p txidind.%d %s\n",dest->H.hdrsi,ramchain,dest->H.txidind,bits256_str(str,tx->txid));
printf("ITER [%d] TXID.%d -> dest.%p desttxid.%d dest->hashmem.%p numtxids.%d\n",ramchain->H.data->height,ramchain->H.txidind,dest,dest!=0?dest->H.txidind:0,dest!=0?dest->hashmem:0,rdata->numtxids);
if ( iguana_ramchain_addtxid(coin,RAMCHAIN_DESTARG,tx->txid,tx->numvouts,tx->numvins,tx->locktime,tx->version,tx->timestamp) == 0 )
return(-2);
}

2
iguana/iguana_unspents.c

@ -916,8 +916,8 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
flag++;
if ( iguana_RTutxo(coin,bp,dest,bundlei) < 0 )
return(-1);
//printf(">>>> RT.%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld\n",coin->RTheight,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize);
coin->RTheight++;
printf(">>>> RT.%d hwm.%d L.%d T.%d U.%d S.%d P.%d X.%d -> size.%ld\n",coin->RTheight,coin->blocks.hwmchain.height,coin->longestchain,dest->H.txidind,dest->H.unspentind,dest->H.spendind,dest->pkind,dest->externalind,(long)dest->H.data->allocsize);
coin->RTramchain.H.data->numblocks = bundlei + 1;
} else printf("error mapchaininit\n");
iguana_ramchain_free(coin,&blockR,1);

Loading…
Cancel
Save