Re-download corrupted block files
MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -694,8 +694,17 @@ namespace WalletWasabi.Services
if (hash == new uint256(fileName))
{
var blockBytes = await File.ReadAllBytesAsync(filePath);
+ try
+ {
return Block.Load(blockBytes, Synchronizer.Network);
}
+ catch(Exception)
+ {
+ // In case the block file is corrupted we get an EndOfStreamException exception
+ // Ignore any error and continue by re-downloading the block.
+ break;
+ }
+ }
}
}
cancel.ThrowIfCancellationRequested();

Re-download corrupted block files