Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
c3a394f342
  1. 2
      iguana/iguana777.c
  2. 6
      iguana/iguana_realtime.c
  3. 6
      iguana/iguana_recv.c

2
iguana/iguana777.c

@ -384,7 +384,7 @@ int32_t iguana_helperA(struct supernet_info *myinfo,struct iguana_info *coin,int
printf("iguana_helperA unexpected null bp\n"); printf("iguana_helperA unexpected null bp\n");
return(-1); return(-1);
} }
printf("helperid.%d validate gen utxo.[%d] utxofinish.%u\n",helperid,bp->hdrsi,bp->utxofinish); //printf("helperid.%d validate gen utxo.[%d] utxofinish.%u\n",helperid,bp->hdrsi,bp->utxofinish);
if ( iguana_bundlevalidate(myinfo,coin,bp,0) == bp->n ) // if ( iguana_bundlevalidate(myinfo,coin,bp,0) == bp->n ) //
{ {
retval = 0; retval = 0;

6
iguana/iguana_realtime.c

@ -1017,9 +1017,7 @@ int32_t iguana_RTiterate(struct supernet_info *myinfo,struct iguana_info *coin,i
bp->blocks[block->bundlei] = block; bp->blocks[block->bundlei] = block;
bp->hashes[block->bundlei] = block->RO.hash2; bp->hashes[block->bundlei] = block->RO.hash2;
block->height = coin->firstRTheight+offset; block->height = coin->firstRTheight+offset;
} if ( coin->peers != 0 )
iguana_blockQ("RTiterate",coin,bp,block->bundlei,block->RO.hash2,1);
if ( 0 && coin->peers != 0 )
{ {
if ( coin->peers->numranked > 0 ) if ( coin->peers->numranked > 0 )
{ {
@ -1030,6 +1028,8 @@ int32_t iguana_RTiterate(struct supernet_info *myinfo,struct iguana_info *coin,i
} }
} else iguana_updatemetrics(myinfo,coin); } else iguana_updatemetrics(myinfo,coin);
} }
}
iguana_blockQ("RTiterate",coin,bp,block->bundlei,block->RO.hash2,1);
num = 0; num = 0;
for (height=block->height+1; height<=coin->blocks.hwmchain.height; height++) for (height=block->height+1; height<=coin->blocks.hwmchain.height; height++)
{break; {break;

6
iguana/iguana_recv.c

@ -124,7 +124,7 @@ int32_t iguana_sendblockreqPT(struct iguana_info *coin,struct iguana_peer *addr,
} }
if ( block != 0 ) if ( block != 0 )
block->issued = addr->pendtime; block->issued = addr->pendtime;
if ( coin->RTheight > 0 && coin->current == bp ) if ( coin->RTheight > 0 )//&& coin->current == bp )
printf("REQ.(%s) [%d:%d] %s n.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1,addr->ipaddr,addr->pendblocks); printf("REQ.(%s) [%d:%d] %s n.%d\n",bits256_str(hexstr,hash2),bundlei,bp!=0?bp->hdrsi:-1,addr->ipaddr,addr->pendblocks);
} else printf("MSG_BLOCK null datalen.%d\n",len); } else printf("MSG_BLOCK null datalen.%d\n",len);
return(len); return(len);
@ -797,6 +797,8 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
bp->speculative[bundlei] = bp->hashes[bundlei]; bp->speculative[bundlei] = bp->hashes[bundlei];
bp->blocks[bundlei] = block; bp->blocks[bundlei] = block;
} }
numtx = origtxdata->zblock.RO.txn_count;
iguana_RTgotblock(coin,origtxdata->zblock.RO.hash2,data,&recvlen,&numtx);
printf("getblockM update [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2)); printf("getblockM update [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2));
block->txvalid = 1; block->txvalid = 1;
if ( block->fpipbits != 0 && block->fpos >= 0 ) if ( block->fpipbits != 0 && block->fpos >= 0 )
@ -821,8 +823,6 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
txdata->zblock.fpipbits = (uint32_t)addr->ipbits; txdata->zblock.fpipbits = (uint32_t)addr->ipbits;
txdata->zblock.RO.recvlen = recvlen; txdata->zblock.RO.recvlen = recvlen;
txdata->zblock.fpos = 0; txdata->zblock.fpos = 0;
numtx = origtxdata->zblock.RO.txn_count;
iguana_RTgotblock(coin,txdata->zblock.RO.hash2,data,&recvlen,&numtx);
copyflag = (coin->enableCACHE != 0) && (strcmp(coin->symbol,"BTC") != 0); copyflag = (coin->enableCACHE != 0) && (strcmp(coin->symbol,"BTC") != 0);
req = iguana_recv_bundlereq(coin,addr,copyflag,H,data,recvlen,bp,bundlei,txdata); req = iguana_recv_bundlereq(coin,addr,copyflag,H,data,recvlen,bp,bundlei,txdata);
queue_enqueue("recvQ",&coin->recvQ,&req->DL,0); queue_enqueue("recvQ",&coin->recvQ,&req->DL,0);

Loading…
Cancel
Save