commenting out part of flatfile.dump, which is causing data corruption
This commit is contained in:
parent
deb0f0ca14
commit
49b8123ae1
@ -201,22 +201,25 @@ public:
|
|||||||
int64_t nStart = GetTimeMillis();
|
int64_t nStart = GetTimeMillis();
|
||||||
|
|
||||||
LogPrintf("Verifying %s format...\n", strFilename);
|
LogPrintf("Verifying %s format...\n", strFilename);
|
||||||
ReadResult readResult = Read(objToSave, true);
|
|
||||||
|
|
||||||
// there was an error and it was not an error on file opening => do not proceed
|
// 12.1 -- pls fix -- causing corruption of the dat files ---
|
||||||
if (readResult == FileError)
|
|
||||||
LogPrintf("Missing file - %s, will try to recreate\n", strFilename);
|
// ReadResult readResult = Read(objToSave, true);
|
||||||
else if (readResult != Ok)
|
|
||||||
{
|
// // there was an error and it was not an error on file opening => do not proceed
|
||||||
LogPrintf("Error reading %s: ", strFilename);
|
// if (readResult == FileError)
|
||||||
if(readResult == IncorrectFormat)
|
// LogPrintf("Missing file - %s, will try to recreate\n", strFilename);
|
||||||
LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
|
// else if (readResult != Ok)
|
||||||
else
|
// {
|
||||||
{
|
// LogPrintf("Error reading %s: ", strFilename);
|
||||||
LogPrintf("file format is unknown or invalid, please fix it manually\n");
|
// if(readResult == IncorrectFormat)
|
||||||
return false;
|
// LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
|
||||||
}
|
// else
|
||||||
}
|
// {
|
||||||
|
// LogPrintf("file format is unknown or invalid, please fix it manually\n");
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
LogPrintf("Writting info to %s...\n", strFilename);
|
LogPrintf("Writting info to %s...\n", strFilename);
|
||||||
Write(objToSave);
|
Write(objToSave);
|
||||||
|
@ -191,6 +191,8 @@ void Interrupt(boost::thread_group& threadGroup)
|
|||||||
/** Preparing steps before shutting down or restarting the wallet */
|
/** Preparing steps before shutting down or restarting the wallet */
|
||||||
void PrepareShutdown()
|
void PrepareShutdown()
|
||||||
{
|
{
|
||||||
|
LogPrintf("1 %s\n", governance.ToString());
|
||||||
|
|
||||||
fRequestShutdown = true; // Needed when we shutdown the wallet
|
fRequestShutdown = true; // Needed when we shutdown the wallet
|
||||||
fRestartRequested = true; // Needed when we restart the wallet
|
fRestartRequested = true; // Needed when we restart the wallet
|
||||||
LogPrintf("%s: In progress...\n", __func__);
|
LogPrintf("%s: In progress...\n", __func__);
|
||||||
@ -199,6 +201,8 @@ void PrepareShutdown()
|
|||||||
if (!lockShutdown)
|
if (!lockShutdown)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
LogPrintf("2 %s\n", governance.ToString());
|
||||||
|
|
||||||
/// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
|
/// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
|
||||||
/// for example if the data directory was found to be locked.
|
/// for example if the data directory was found to be locked.
|
||||||
/// Be sure that anything that writes files or flushes caches only does this if the respective
|
/// Be sure that anything that writes files or flushes caches only does this if the respective
|
||||||
|
Loading…
Reference in New Issue
Block a user