Use AutoFile where possible

This commit is contained in:
MacroFake
2022-06-06 17:22:59 +02:00
parent 6666803c89
commit facc2fa7b8
17 changed files with 46 additions and 49 deletions

View File

@@ -2293,7 +2293,7 @@ static RPCHelpMan dumptxoutset()
}
FILE* file{fsbridge::fopen(temppath, "wb")};
CAutoFile afile{file, SER_DISK, CLIENT_VERSION};
AutoFile afile{file};
if (afile.IsNull()) {
throw JSONRPCError(
RPC_INVALID_PARAMETER,
@@ -2314,7 +2314,7 @@ static RPCHelpMan dumptxoutset()
UniValue CreateUTXOSnapshot(
NodeContext& node,
CChainState& chainstate,
CAutoFile& afile,
AutoFile& afile,
const fs::path& path,
const fs::path& temppath)
{