From 85eb2cef33fcf3e5c785d54b172eb3e8f932e3cb Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 13 Oct 2013 22:15:48 +0200 Subject: Do not use the redundant BestInvalidWork record in the block database. As block index entries have a flag for marking invalid blocks, the 'best invalid work' information can be derived from there. In addition, remove the global from main.h --- src/txdb.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/txdb.cpp') diff --git a/src/txdb.cpp b/src/txdb.cpp index 5e7b78296c..27d6caf4d9 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -74,13 +74,9 @@ bool CBlockTreeDB::WriteBlockIndex(const CDiskBlockIndex& blockindex) return Write(make_pair('b', blockindex.GetBlockHash()), blockindex); } -bool CBlockTreeDB::ReadBestInvalidWork(CBigNum& bnBestInvalidWork) -{ - return Read('I', bnBestInvalidWork); -} - bool CBlockTreeDB::WriteBestInvalidWork(const CBigNum& bnBestInvalidWork) { + // Obsolete; only written for backward compatibility. return Write('I', bnBestInvalidWork); } -- cgit v1.2.3