Skip to content

Commit 99c8d54

Browse files
committed
[HACK] Very temporary fix for reindex failure
1 parent 590d715 commit 99c8d54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,7 +3877,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskB
38773877
int nLoaded = 0;
38783878
try {
38793879
// This takes over fileIn and calls fclose() on it in the CBufferedFile destructor
3880-
CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION | SERIALIZE_TRANSACTION_WITNESS);
3880+
CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE*4, 4*MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION | SERIALIZE_TRANSACTION_WITNESS);
38813881
uint64_t nRewind = blkdat.GetPos();
38823882
while (!blkdat.eof()) {
38833883
boost::this_thread::interruption_point();
@@ -3896,7 +3896,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskB
38963896
continue;
38973897
// read size
38983898
blkdat >> nSize;
3899-
if (nSize < 80 || nSize > MAX_BLOCK_SIZE)
3899+
if (nSize < 80 || nSize > 4*MAX_BLOCK_SIZE)
39003900
continue;
39013901
} catch (const std::exception&) {
39023902
// no valid block header found; don't complain

0 commit comments

Comments
 (0)