|
|
|
@ -1082,7 +1082,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
@@ -1082,7 +1082,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
|
|
|
|
|
bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos) |
|
|
|
|
{ |
|
|
|
|
// Open history file to append
|
|
|
|
|
CAutoFile fileout = CAutoFile(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION); |
|
|
|
|
CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION); |
|
|
|
|
if (!fileout) |
|
|
|
|
return error("WriteBlockToDisk : OpenBlockFile failed"); |
|
|
|
|
|
|
|
|
@ -1110,7 +1110,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
@@ -1110,7 +1110,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
|
|
|
|
|
block.SetNull(); |
|
|
|
|
|
|
|
|
|
// Open history file to read
|
|
|
|
|
CAutoFile filein = CAutoFile(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION); |
|
|
|
|
CAutoFile filein(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION); |
|
|
|
|
if (!filein) |
|
|
|
|
return error("ReadBlockFromDisk : OpenBlockFile failed"); |
|
|
|
|
|
|
|
|
@ -4503,7 +4503,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
@@ -4503,7 +4503,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
|
|
|
|
bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock) |
|
|
|
|
{ |
|
|
|
|
// Open history file to append
|
|
|
|
|
CAutoFile fileout = CAutoFile(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION); |
|
|
|
|
CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION); |
|
|
|
|
if (!fileout) |
|
|
|
|
return error("CBlockUndo::WriteToDisk : OpenUndoFile failed"); |
|
|
|
|
|
|
|
|
@ -4535,7 +4535,7 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
@@ -4535,7 +4535,7 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
|
|
|
|
|
bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock) |
|
|
|
|
{ |
|
|
|
|
// Open history file to read
|
|
|
|
|
CAutoFile filein = CAutoFile(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION); |
|
|
|
|
CAutoFile filein(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION); |
|
|
|
|
if (!filein) |
|
|
|
|
return error("CBlockUndo::ReadFromDisk : OpenBlockFile failed"); |
|
|
|
|
|
|
|
|
|