Return CAutoFile from BlockManager::Open*File()

This is a refactor.
This commit is contained in:
MarcoFalke
2023-06-30 16:25:13 +02:00
parent 9999b89cd3
commit fa56c421be
4 changed files with 18 additions and 17 deletions

View File

@@ -79,7 +79,7 @@ bool TxIndex::FindTx(const uint256& tx_hash, uint256& block_hash, CTransactionRe
return false;
}
CAutoFile file{m_chainstate->m_blockman.OpenBlockFile(postx, true), CLIENT_VERSION};
CAutoFile file{m_chainstate->m_blockman.OpenBlockFile(postx, true)};
if (file.IsNull()) {
return error("%s: OpenBlockFile failed", __func__);
}