jl777 7 years ago
parent
commit
6db5b63484
  1. 9
      iguana/exchanges/LP_nativeDEX.c

9
iguana/exchanges/LP_nativeDEX.c

@ -586,7 +586,10 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
coin->lastgetinfo = (uint32_t)time(NULL); coin->lastgetinfo = (uint32_t)time(NULL);
} }
if ( coin->firstrefht == 0 ) if ( coin->firstrefht == 0 )
{
printf("%s no firstrefht\n",coin->symbol);
continue; continue;
}
else if ( coin->firstscanht == 0 ) else if ( coin->firstscanht == 0 )
coin->lastscanht = coin->firstscanht = coin->firstrefht; coin->lastscanht = coin->firstscanht = coin->firstrefht;
else if ( coin->firstrefht < coin->firstscanht ) else if ( coin->firstrefht < coin->firstscanht )
@ -595,7 +598,10 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
coin->lastscanht = coin->firstscanht = coin->firstrefht; coin->lastscanht = coin->firstscanht = coin->firstrefht;
} }
if ( coin->lastscanht == coin->longestchain+1 ) if ( coin->lastscanht == coin->longestchain+1 )
{
printf("%s lastscanht.%d is longest.%d + 1\n",coin->synbol,coin->lastscanht,coin->longestchain)
continue; continue;
}
else if ( coin->lastscanht > coin->longestchain+1 ) else if ( coin->lastscanht > coin->longestchain+1 )
{ {
printf("detected chain rewind lastscanht.%d vs longestchain.%d, first.%d ref.%d\n",coin->lastscanht,coin->longestchain,coin->firstscanht,coin->firstrefht); printf("detected chain rewind lastscanht.%d vs longestchain.%d, first.%d ref.%d\n",coin->lastscanht,coin->longestchain,coin->firstscanht,coin->firstrefht);
@ -609,7 +615,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
//if ( (coin->lastscanht % 1000) == 0 ) //if ( (coin->lastscanht % 1000) == 0 )
for (j=0; j<100; j++) for (j=0; j<100; j++)
{ {
if ( strcmp("REVS",coin->symbol) == 0 ) //if ( strcmp("REVS",coin->symbol) == 0 )
printf("%s ref.%d scan.%d to %d, longest.%d\n",coin->symbol,coin->firstrefht,coin->firstscanht,coin->lastscanht,coin->longestchain); printf("%s ref.%d scan.%d to %d, longest.%d\n",coin->symbol,coin->firstrefht,coin->firstscanht,coin->lastscanht,coin->longestchain);
if ( LP_blockinit(coin,coin->lastscanht) < 0 ) if ( LP_blockinit(coin,coin->lastscanht) < 0 )
{ {
@ -623,6 +629,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
nonz++; nonz++;
if ( j < 100 ) if ( j < 100 )
continue; continue;
printf("break out of coins iters\n");
//LP_getestimatedrate(coin); //LP_getestimatedrate(coin);
break; break;
} }

Loading…
Cancel
Save