Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
5c366259ff
  1. 4
      iguana/iguana_blocks.c
  2. 2
      iguana/iguana_bundles.c
  3. 4
      iguana/iguana_ramchain.c
  4. 9
      iguana/iguana_realtime.c

4
iguana/iguana_blocks.c

@ -683,8 +683,8 @@ struct iguana_block *_iguana_chainlink(struct supernet_info *myinfo,struct iguan
bp->blocks[bundlei] = block;
else
{
char str[65],str2[65];
printf("ERROR: need to fix up bundle for height.%d (%p %p) (%s %s)\n",block->height,block,bp->blocks[bundlei],bits256_str(str,block->RO.hash2),bits256_str(str2,bp->hashes[bundlei]));
//char str[65],str2[65];
//printf("ERROR: need to fix up bundle for height.%d (%p %p) (%s %s)\n",block->height,block,bp->blocks[bundlei],bits256_str(str,block->RO.hash2),bits256_str(str2,bp->hashes[bundlei]));
bp->blocks[bundlei] = block;
bp->hashes[bundlei] = block->RO.hash2;

2
iguana/iguana_bundles.c

@ -325,7 +325,7 @@ int32_t iguana_bundlehash2add(struct iguana_info *coin,struct iguana_block **blo
if ( err != 0 )
{
static uint32_t counter;
if ( counter++ < 100 )
if ( counter++ < 10 )
printf("bundlehash2add err.%d\n",err);
//return(0);
}

4
iguana/iguana_ramchain.c

@ -348,14 +348,14 @@ uint32_t iguana_ramchain_addunspent20(struct iguana_info *coin,struct iguana_pee
}
}
u->txidind = ramchain->H.txidind;
if ( 0 && vout > 0 )
if ( 1 && vout > 0 )
{
int32_t i; for (i=0; i<20; i++)
printf("%02x",rmd160[i]);
printf(" rmd160 ");
for (i=0; i<20; i++)
printf("%02x",u->rmd160[i]);
char str[65]; printf(" u->rmd160 type.%d scriptlen.%d:%d (%s).v%d ht.%d\n",u->type,scriptlen,u->scriptlen,bits256_str(str,txid),vout,bp->bundleheight);
char str[65]; printf(" u->rmd160 type.%d scriptpos.%d scriptlen.%d:%d (%s).v%d ht.%d\n",u->type,u->scriptpos,scriptlen,u->scriptlen,bits256_str(str,txid),vout,bp->bundleheight);
}
}
return(unspentind);

9
iguana/iguana_realtime.c

@ -727,7 +727,7 @@ int32_t iguana_RTblockadd(struct supernet_info *myinfo,struct iguana_info *coin,
offset = block->height - coin->firstRTheight;
if ( coin->RTrawdata[offset] == 0 )
coin->RTrawdata[offset] = iguana_RTrawdata(coin,block->RO.hash2,0,&coin->RTrecvlens[offset],&coin->RTnumtx[offset],0);
printf("%s RTblockadd.%d offset.%d numtx.%d len.%d\n",coin->symbol,block->height,offset,coin->RTnumtx[offset],coin->RTrecvlens[offset]);
//printf("%s RTblockadd.%d offset.%d numtx.%d len.%d\n",coin->symbol,block->height,offset,coin->RTnumtx[offset],coin->RTrecvlens[offset]);
block->RO.txn_count = coin->RTnumtx[offset];
coin->RTblocks[offset] = block;
if ( iguana_RTiterate(myinfo,coin,offset,block,1) < 0 )
@ -814,7 +814,7 @@ void iguana_RTnewblock(struct supernet_info *myinfo,struct iguana_info *coin,str
coin->RTheight += i;
if ( coin->RTheight != coin->lastRTheight+1 )
printf("ERROR: ");
printf("%s >= RTnewblock RTheight %d prev %d\n",coin->symbol,coin->RTheight,coin->lastRTheight);
//printf("%s >= RTnewblock RTheight %d prev %d\n",coin->symbol,coin->RTheight,coin->lastRTheight);
}
else if ( block->height == coin->lastRTheight )
{
@ -832,7 +832,8 @@ void iguana_RTnewblock(struct supernet_info *myinfo,struct iguana_info *coin,str
else
{
char str[65]; printf("reorg RTheight.%d vs block.%d %s\n",coin->RTheight,block->height,bits256_str(str,block->RO.hash2));
while ( coin->RTheight > block->height )
iguana_RTreset(coin);
/*while ( coin->RTheight > block->height )
{
if ( iguana_RTblocksub(myinfo,coin,iguana_RTblock(coin,coin->RTheight-1)) < 0 )
{
@ -850,7 +851,7 @@ void iguana_RTnewblock(struct supernet_info *myinfo,struct iguana_info *coin,str
return;
}
coin->lastRTheight = block->height;
coin->RTheight = coin->lastRTheight+1;
coin->RTheight = coin->lastRTheight+1;*/
}
portable_mutex_unlock(&coin->RTmutex);
}

Loading…
Cancel
Save