|
|
@ -221,7 +221,7 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info * |
|
|
|
} |
|
|
|
if ( coin->spendvectorsaved <= 1 ) |
|
|
|
{ |
|
|
|
printf("spendvectorsaved not yet\n"); |
|
|
|
//printf("spendvectorsaved not yet\n");
|
|
|
|
usleep(100000); |
|
|
|
return(0); |
|
|
|
} |
|
|
@ -283,7 +283,7 @@ printf("spendvectorsaved not yet\n"); |
|
|
|
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("RTheight.%d hwm.%d\n",coin->RTheight,coin->blocks.hwmchain.height);
|
|
|
|
while ( (rdata= coin->RTramchain.H.data) != 0 && coin->RTheight <= coin->blocks.hwmchain.height-offset && coin->RTdatabad == 0 ) |
|
|
|
{ |
|
|
|
dest = &coin->RTramchain; |
|
|
@ -291,7 +291,7 @@ printf("spendvectorsaved not yet\n"); |
|
|
|
bundlei = (coin->RTheight % coin->chain->bundlesize); |
|
|
|
if ( (block= iguana_bundleblock(coin,&hash2,bp,bundlei)) != 0 ) |
|
|
|
iguana_bundlehashadd(coin,bp,bundlei,block); |
|
|
|
printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p databad.%d prevnonz.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data,coin->RTdatabad,bits256_nonz(block->RO.prev_block)); |
|
|
|
//printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p databad.%d prevnonz.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data,coin->RTdatabad,bits256_nonz(block->RO.prev_block));
|
|
|
|
if ( coin->RTdatabad == 0 && block != 0 && (block->height == 0 || bits256_nonz(block->RO.prev_block) != 0) ) |
|
|
|
{ |
|
|
|
//printf("bundlei.%d blockht.%d RTheight.%d\n",bundlei,block->height,coin->RTheight);
|
|
|
@ -331,7 +331,7 @@ printf("spendvectorsaved not yet\n"); |
|
|
|
flag++; |
|
|
|
//coin->blocks.RO[bp->bundleheight+bundlei] = block->RO;
|
|
|
|
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); |
|
|
|
//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);
|
|
|
|
if ( coin->RTramchain.H.data != 0 ) |
|
|
|
coin->RTramchain.H.data->numblocks = bundlei + 1; |
|
|
|
else break; |
|
|
|