unsigned int nChains = nAllocatedSize / sizeof(RainbowChain);
uint64 curPrefix = 0, prefixStart = 0;
vector<IndexRow> indexes;
- while(reader->GetChainsLeft() > 0) {
+ unsigned int chainsLeft;
+ while((chainsLeft = reader->GetChainsLeft()) > 0) {
/* if (ftell(file) == nFileLen)
break;*/
+ printf("%u chains left to read\n", chainsLeft);
int nReadThisRound;
clock_t t1 = clock();
printf("reading...\n");
#ifdef _MEMORYDEBUG
printf("Grabbing %i chains from file\n", nChains);
#endif
- reader->ReadChains(nChains, pChain);
+ reader->ReadChains(nChains, pChain);
#ifdef _MEMORYDEBUG
printf("Recieved %i chains from file\n", nChains);
#endif
// then write the distance amount of 00's
if(diffSize > 1000) {
- printf("WARNING! The distance to the next prefix is %i. Do you want to continue writing %i bytes of 0x00? Press y to continue", diffSize, diffSize);
+ printf("WARNING! The distance to the next prefix is %i. Do you want to continue writing %i bytes of 0x00? Press y to continue", diffSize, (diffSize*m_indexrowsizebytes));
#ifdef _WIN32
if ( _getch() != 'y' ) {
#else