Startup RPC check, failed block queue setup

This commit is contained in:
instagibbs 2016-06-03 09:25:25 -04:00 committed by Gregory Sanders
parent bd55bf3d36
commit f7424036e9
5 changed files with 109 additions and 0 deletions

View file

@ -20,6 +20,7 @@ static const char DB_TXINDEX = 't';
static const char DB_LOCKS = 'k';
static const char DB_BLOCK_INDEX = 'b';
static const char DB_WITHDRAW_FLAG = 'w';
static const char DB_INVALID_BLOCK_Q = 'q';
static const char DB_BEST_BLOCK = 'B';
static const char DB_FLAG = 'F';
@ -212,6 +213,14 @@ bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) {
return true;
}
bool CBlockTreeDB::ReadInvalidBlockQueue(std::vector<uint256> &vBlocks) {
return Read(std::make_pair(DB_INVALID_BLOCK_Q, uint256S("0")), vBlocks);//FIXME: why uint256 and not ""
}
bool CBlockTreeDB::WriteInvalidBlockQueue(const std::vector<uint256> &vBlocks) {
return Write(std::make_pair(DB_INVALID_BLOCK_Q, uint256S("0")), vBlocks);
}
bool CBlockTreeDB::LoadBlockIndexGuts(boost::function<CBlockIndex*(const uint256&)> insertBlockIndex)
{
std::unique_ptr<CDBIterator> pcursor(NewIterator());