|
|
@ -337,7 +337,7 @@ public: |
|
|
|
void Write(CAutoFile& fileout) const |
|
|
|
void Write(CAutoFile& fileout) const |
|
|
|
{ |
|
|
|
{ |
|
|
|
fileout << nBestSeenHeight; |
|
|
|
fileout << nBestSeenHeight; |
|
|
|
fileout << history.size(); |
|
|
|
fileout << (uint32_t)history.size(); |
|
|
|
BOOST_FOREACH(const CBlockAverage& entry, history) |
|
|
|
BOOST_FOREACH(const CBlockAverage& entry, history) |
|
|
|
{ |
|
|
|
{ |
|
|
|
entry.Write(fileout); |
|
|
|
entry.Write(fileout); |
|
|
@ -348,7 +348,7 @@ public: |
|
|
|
{ |
|
|
|
{ |
|
|
|
int nFileBestSeenHeight; |
|
|
|
int nFileBestSeenHeight; |
|
|
|
filein >> nFileBestSeenHeight; |
|
|
|
filein >> nFileBestSeenHeight; |
|
|
|
size_t numEntries; |
|
|
|
uint32_t numEntries; |
|
|
|
filein >> numEntries; |
|
|
|
filein >> numEntries; |
|
|
|
if (numEntries <= 0 || numEntries > 10000) |
|
|
|
if (numEntries <= 0 || numEntries > 10000) |
|
|
|
throw runtime_error("Corrupt estimates file. Must have between 1 and 10k entries."); |
|
|
|
throw runtime_error("Corrupt estimates file. Must have between 1 and 10k entries."); |
|
|
|