rolled version, fix txindex_test, other tweaks
This commit is contained in:
parent
71bd612c4a
commit
ffe828b1d9
5 changed files with 12 additions and 14 deletions
|
@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||||
AC_PREREQ([2.60])
|
AC_PREREQ([2.60])
|
||||||
define(_CLIENT_VERSION_MAJOR, 0)
|
define(_CLIENT_VERSION_MAJOR, 0)
|
||||||
define(_CLIENT_VERSION_MINOR, 17)
|
define(_CLIENT_VERSION_MINOR, 17)
|
||||||
define(_CLIENT_VERSION_REVISION, 2)
|
define(_CLIENT_VERSION_REVISION, 3)
|
||||||
define(_CLIENT_VERSION_BUILD, 1)
|
define(_CLIENT_VERSION_BUILD, 0)
|
||||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||||
define(_COPYRIGHT_YEAR, 2019)
|
define(_COPYRIGHT_YEAR, 2019)
|
||||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||||
|
|
|
@ -640,7 +640,7 @@ bool CClaimTrieCacheBase::ReadFromDisk(const CBlockIndex* tip)
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
if (tip && base->db->Exists(std::make_pair(TRIE_NODE, std::string()))) {
|
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 false;
|
||||||
}
|
}
|
||||||
return validateTrieConsistency(tip);
|
return validateTrieConsistency(tip);
|
||||||
|
|
|
@ -188,12 +188,14 @@ bool CDBWrapper::Sync() {
|
||||||
|
|
||||||
bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
|
bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
|
||||||
{
|
{
|
||||||
|
if (!pdb)
|
||||||
|
return false;
|
||||||
|
|
||||||
const bool log_memory = LogAcceptCategory(BCLog::LEVELDB);
|
const bool log_memory = LogAcceptCategory(BCLog::LEVELDB);
|
||||||
double mem_before = 0;
|
double mem_before = 0;
|
||||||
if (log_memory) {
|
if (log_memory) {
|
||||||
mem_before = DynamicMemoryUsage() / 1024.0 / 1024;
|
mem_before = DynamicMemoryUsage() / 1024.0 / 1024;
|
||||||
}
|
}
|
||||||
assert(pdb);
|
|
||||||
leveldb::Status status = pdb->Write(fSync ? syncoptions : writeoptions, &batch.batch);
|
leveldb::Status status = pdb->Write(fSync ? syncoptions : writeoptions, &batch.batch);
|
||||||
dbwrapper_private::HandleError(status);
|
dbwrapper_private::HandleError(status);
|
||||||
if (log_memory) {
|
if (log_memory) {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
#include <boost/foreach.hpp>
|
|
||||||
#include "nameclaim.h"
|
#include "nameclaim.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "claimtrie.h"
|
|
||||||
|
|
||||||
|
|
||||||
std::vector<unsigned char> uint32_t_to_vch(uint32_t n)
|
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;
|
uint32_t n;
|
||||||
static const size_t uint32Size = sizeof(uint32_t);
|
static const size_t uint32Size = sizeof(uint32_t);
|
||||||
if (vchN.size() != uint32Size) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
n = vchN[0] << 24 | vchN[1] << 16 | vchN[2] << 8 | vchN[3];
|
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;
|
CAmount min_fee = 0;
|
||||||
BOOST_FOREACH(const CTxOut& txout, tx.vout)
|
for (const CTxOut& txout: tx.vout)
|
||||||
{
|
{
|
||||||
int op;
|
int op;
|
||||||
std::vector<std::vector<unsigned char> > vvchParams;
|
std::vector<std::vector<unsigned char> > vvchParams;
|
||||||
|
|
|
@ -2254,7 +2254,8 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string warningMessages;
|
std::string warningMessages;
|
||||||
if (!IsInitialBlockDownload())
|
auto isInitialBlockDownload = IsInitialBlockDownload();
|
||||||
|
if (!isInitialBlockDownload)
|
||||||
{
|
{
|
||||||
int nUpgraded = 0;
|
int nUpgraded = 0;
|
||||||
const CBlockIndex* pindex = pindexNew;
|
const CBlockIndex* pindex = pindexNew;
|
||||||
|
@ -2289,8 +2290,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
|
||||||
}
|
}
|
||||||
static int64_t lastBlockPrintTime = 0;
|
static int64_t lastBlockPrintTime = 0;
|
||||||
auto currentTime = GetAdjustedTime();
|
auto currentTime = GetAdjustedTime();
|
||||||
auto oldBlock = pindexNew->nTime + MAX_FUTURE_BLOCK_TIME < currentTime;
|
if (!warningMessages.empty() || !isInitialBlockDownload || lastBlockPrintTime < currentTime - 15 || LogAcceptCategory(BCLog::CLAIMS)) {
|
||||||
if (!warningMessages.empty() || !oldBlock || lastBlockPrintTime < currentTime - 15 || LogAcceptCategory(BCLog::CLAIMS)) {
|
|
||||||
lastBlockPrintTime = currentTime;
|
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",
|
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,
|
__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()),
|
(unsigned long) pindexNew->nChainTx, FormatISO8601DateTime(pindexNew->GetBlockTime()),
|
||||||
GuessVerificationProgress(chainParams.TxData(), pindexNew),
|
GuessVerificationProgress(chainParams.TxData(), pindexNew),
|
||||||
pcoinsTip->DynamicMemoryUsage() * (1.0 / (1U << 20U)), pcoinsTip->GetCacheSize(),
|
pcoinsTip->DynamicMemoryUsage() * (1.0 / (1U << 20U)), pcoinsTip->GetCacheSize(),
|
||||||
oldBlock ? " (synchronizing)" : "");
|
isInitialBlockDownload ? " IBD" : "");
|
||||||
if (!warningMessages.empty())
|
if (!warningMessages.empty())
|
||||||
LogPrintf(" warning='%s'", warningMessages); /* Continued */
|
LogPrintf(" warning='%s'", warningMessages); /* Continued */
|
||||||
LogPrintf("\n");
|
LogPrintf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Disconnect chainActive's tip.
|
/** Disconnect chainActive's tip.
|
||||||
|
|
Loading…
Reference in a new issue