rolled version, fix txindex_test, other tweaks

This commit is contained in:
Brannon King 2019-09-16 14:54:05 -06:00
parent 71bd612c4a
commit ffe828b1d9
5 changed files with 12 additions and 14 deletions

View file

@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 17)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
define(_COPYRIGHT_HOLDERS,[The %s developers])

View file

@ -640,7 +640,7 @@ bool CClaimTrieCacheBase::ReadFromDisk(const CBlockIndex* tip)
clear();
if (tip && base->db->Exists(std::make_pair(TRIE_NODE, std::string()))) {
LogPrintf("The claim trie database contains deprecated data and will need to be rebuilt");
LogPrintf("The claim trie database contains deprecated data and will need to be rebuilt\n");
return false;
}
return validateTrieConsistency(tip);

View file

@ -188,12 +188,14 @@ bool CDBWrapper::Sync() {
bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
{
if (!pdb)
return false;
const bool log_memory = LogAcceptCategory(BCLog::LEVELDB);
double mem_before = 0;
if (log_memory) {
mem_before = DynamicMemoryUsage() / 1024.0 / 1024;
}
assert(pdb);
leveldb::Status status = pdb->Write(fSync ? syncoptions : writeoptions, &batch.batch);
dbwrapper_private::HandleError(status);
if (log_memory) {

View file

@ -1,9 +1,6 @@
#include <boost/foreach.hpp>
#include "nameclaim.h"
#include "hash.h"
#include "util.h"
#include "claimtrie.h"
std::vector<unsigned char> uint32_t_to_vch(uint32_t n)
{
@ -21,7 +18,7 @@ uint32_t vch_to_uint32_t(std::vector<unsigned char>& vchN)
uint32_t n;
static const size_t uint32Size = sizeof(uint32_t);
if (vchN.size() != uint32Size) {
LogPrintf("%s() : a vector<unsigned char> with size other than 4 has been given", __func__);
LogPrintf("%s() : a vector<unsigned char> with size other than 4 has been given\n", __func__);
return 0;
}
n = vchN[0] << 24 | vchN[1] << 16 | vchN[2] << 8 | vchN[3];
@ -203,7 +200,7 @@ CAmount CalcMinClaimTrieFee(const CTransaction& tx, const CAmount &minFeePerName
}
CAmount min_fee = 0;
BOOST_FOREACH(const CTxOut& txout, tx.vout)
for (const CTxOut& txout: tx.vout)
{
int op;
std::vector<std::vector<unsigned char> > vvchParams;

View file

@ -2254,7 +2254,8 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
}
std::string warningMessages;
if (!IsInitialBlockDownload())
auto isInitialBlockDownload = IsInitialBlockDownload();
if (!isInitialBlockDownload)
{
int nUpgraded = 0;
const CBlockIndex* pindex = pindexNew;
@ -2289,8 +2290,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
}
static int64_t lastBlockPrintTime = 0;
auto currentTime = GetAdjustedTime();
auto oldBlock = pindexNew->nTime + MAX_FUTURE_BLOCK_TIME < currentTime;
if (!warningMessages.empty() || !oldBlock || lastBlockPrintTime < currentTime - 15 || LogAcceptCategory(BCLog::CLAIMS)) {
if (!warningMessages.empty() || !isInitialBlockDownload || lastBlockPrintTime < currentTime - 15 || LogAcceptCategory(BCLog::CLAIMS)) {
lastBlockPrintTime = currentTime;
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g txb=%lu tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)%s",
__func__, pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, pindexNew->nVersion,
@ -2298,12 +2298,11 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
(unsigned long) pindexNew->nChainTx, FormatISO8601DateTime(pindexNew->GetBlockTime()),
GuessVerificationProgress(chainParams.TxData(), pindexNew),
pcoinsTip->DynamicMemoryUsage() * (1.0 / (1U << 20U)), pcoinsTip->GetCacheSize(),
oldBlock ? " (synchronizing)" : "");
isInitialBlockDownload ? " IBD" : "");
if (!warningMessages.empty())
LogPrintf(" warning='%s'", warningMessages); /* Continued */
LogPrintf("\n");
}
}
/** Disconnect chainActive's tip.