Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
cdffdb41ff
  1. 7
      iguana/iguana_init.c
  2. 2
      iguana/iguana_recv.c

7
iguana/iguana_init.c

@ -255,7 +255,7 @@ int32_t iguana_bundleinitmap(struct supernet_info *myinfo,struct iguana_info *co
void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int32_t iter,FILE *fp) void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int32_t iter,FILE *fp)
{ {
int32_t j,k,m,c,flag,bundlei,lastheight,height = -1; char checkstr[1024],line[1024]; int32_t j,k,m,c,flag,bundlei,lastheight,missing=0,height = -1; char checkstr[1024],line[1024];
struct iguana_peer *addr; struct iguana_bundle *bp; bits256 allhash,hash2,hash1,zero,lastbundle; struct iguana_peer *addr; struct iguana_bundle *bp; bits256 allhash,hash2,hash1,zero,lastbundle;
if ( coin->FULLNODE == 0 && coin->VALIDATENODE == 0 && iter > 0 ) if ( coin->FULLNODE == 0 && coin->VALIDATENODE == 0 && iter > 0 )
return; return;
@ -374,7 +374,9 @@ void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int3
{ {
if ( iguana_bundleinitmap(myinfo,coin,bp,height,hash2,hash1) == 0 ) if ( iguana_bundleinitmap(myinfo,coin,bp,height,hash2,hash1) == 0 )
lastbundle = hash2, lastheight = height; lastbundle = hash2, lastheight = height;
else if ( strcmp("BTC",coin->symbol) == 0 ) else if ( missing++ > coin->MAXBUNDLES )
{
printf("missing.%d\n",missing);
break; break;
} }
} }
@ -382,6 +384,7 @@ void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int3
} }
} }
} }
}
memset(line,0,sizeof(line)); memset(line,0,sizeof(line));
} }
if ( iter == 1 && bits256_nonz(lastbundle) != 0 ) if ( iter == 1 && bits256_nonz(lastbundle) != 0 )

2
iguana/iguana_recv.c

@ -769,7 +769,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
origtxdata->zblock.RO.recvlen = 0; origtxdata->zblock.RO.recvlen = 0;
printf("gotblockM2: error finding block %s\n",bits256_str(str,origtxdata->zblock.RO.hash2)); printf("gotblockM2: error finding block %s\n",bits256_str(str,origtxdata->zblock.RO.hash2));
return; return;
} else printf("getblockM autoextended.[%d]\n",bp->hdrsi); } //else printf("getblockM autoextended.[%d]\n",bp->hdrsi);
} }
} }
if ( bp == 0 ) if ( bp == 0 )

Loading…
Cancel
Save