Merge 93623eea71 into merged_master (Bitcoin PR #15623)

This commit is contained in:
Andrew Poelstra 2020-10-28 00:09:42 +00:00
commit 45dad5302b
2 changed files with 7 additions and 9 deletions

View file

@ -36,9 +36,9 @@
#include <txmempool.h>
#include <ui_interface.h>
#include <undo.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <validationinterface.h>
#include <warnings.h>
@ -1540,9 +1540,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
return true;
}
namespace {
bool UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart)
static bool UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart)
{
// Open history file to append
CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
@ -1569,7 +1567,7 @@ bool UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos, const uint25
return true;
}
static bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex *pindex)
bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex* pindex)
{
FlatFilePos pos = pindex->GetUndoPos();
if (pos.IsNull()) {
@ -1618,8 +1616,6 @@ static bool AbortNode(CValidationState& state, const std::string& strMessage, co
return state.Error(strMessage);
}
} // namespace
/**
* Restore the UTXO in a Coin at a given COutPoint
* @param undo The Coin to be restored.