Skip to content

Commit

Permalink
build 13.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
licobc committed Jun 6, 2019
1 parent 427f1ae commit 5905d17
Show file tree
Hide file tree
Showing 113 changed files with 934 additions and 844 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 13)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
AC_INIT([Kore Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.kore.org],[kore])
Expand Down
9 changes: 9 additions & 0 deletions depends/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SDKs/
work/
built/
sources/
config.site
x86_64*
i686*
mips*
arm*
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Doxyfile
2 changes: 2 additions & 0 deletions qa/rpc-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
cache
1 change: 1 addition & 0 deletions qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
1 change: 0 additions & 1 deletion src/blocksignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
bool SignBlockWithKey(CBlock& block, const CKey& key);
bool SignBlock(CBlock& block, const CKeyStore& keystore);
bool CheckBlockSignature(const CBlock& block);

bool CheckBlockSignature_Legacy(const CBlock& block, const uint256& hash);

#endif //KORE_BLOCKSIGNATURE_H
20 changes: 19 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class CMainParams : public CChainParams
nCoinMaturity = 25;
nMaxMoneyOut = MAX_MONEY;
nMaxReorganizationDepth = 25;
nMaxTipAge = 24 * 60 * 60;
nMaxTipAge = 2 * 60 * 60;
nMinerConfirmationWindow = 50; // nPowTargetTimespan / nPowTargetSpacing
nMinerThreads = 0;
nPastBlocksMax = 128;
Expand Down Expand Up @@ -248,6 +248,24 @@ class CTestNetParams : public CMainParams
/* nTxCount */ 0,
/* dTxRate */ 0
};

//
checkpointData = {
{
{ 0, nHashGenesisBlock},
{ 25000, uint256S("0xdf692454f3b24470af3fe9d3e4591ae16a98f2d9709e33889001c2df3b27c747")}
}
};

// Getting info from
// getchaintxstats 24999 df692454f3b24470af3fe9d3e4591ae16a98f2d9709e33889001c2df3b27c747
chainTxData = ChainTxData{
// Data from rpc: getchaintxstats
/* nTime */ 1559712610,
/* nTxCount */ 50376,
/* dTxRate */ 0.02124285951644177
};

}
};
static CTestNetParams testNetParams;
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class CChainParams
int64_t GetBudgetFeeConfirmations() const { return nBudgetFeeConfirmations; }
int64_t GetBudgetVoteUpdate() const { return nBudgetVoteUpdate; }
int32_t GetCoinMaturity() const { return nCoinMaturity; }
/** Used if GenerateBitcoins is called with a negative number of threads */
/** Used if GenerateKores is called with a negative number of threads */
int32_t GetDefaultMinerThreads() const { return nMinerThreads; }
int32_t GetDefaultPort() const { return nDefaultPort; }
std::string GetDevFundPubKey() const { return strDevFundPubKey; }
Expand Down
2 changes: 1 addition & 1 deletion src/coins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ CCoinsModifier CCoinsViewCache::ModifyCoins(const uint256& txid)
size_t cachedCoinUsage = 0;
if (fDebug) {
LogPrintf("Coins in the cache : %d \n", cacheCoins.size());
LogPrintf("ModifyCoins_Legacy txid: %s inserted ? %s \n", txid.ToString().c_str(), ret.second ? "true" : "false");
LogPrintf("ModifyCoins txid: %s inserted ? %s \n", txid.ToString().c_str(), ret.second ? "true" : "false");
}
if (ret.second) {
if (!base->GetCoins(txid, ret.first->second.coins)) {
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void PrepareShutdown()
#ifdef ENABLE_WALLET
if (pwalletMain)
bitdb.Flush(false);
GenerateBitcoins(false, NULL, 0);
GenerateKores(false, 0);
#endif
StopNode();
StopTorControl();
Expand Down Expand Up @@ -1738,7 +1738,7 @@ bool AppInit2()
#ifdef ENABLE_WALLET
// Mine proof-of-stake blocks in the background
if (pwalletMain)
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));
GenerateKores(GetBoolArg("-gen", false), GetArg("-genproclimit", 1));
// Mine proof-of-stake blocks in the background
if (!GetBoolArg("-staking", false))
LogPrintf("Staking disabled\n");
Expand Down
13 changes: 13 additions & 0 deletions src/leveldb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
build_config.mk
*.a
*.o
*.dylib*
*.so
*.so.*
*_test
db_bench
leveldbutil
Release
Debug
Benchmark
vs2010.*
33 changes: 18 additions & 15 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ bool IsInitialBlockDownload()
static bool lockIBDState = false;
if (lockIBDState)
return false;
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 60 || // 60 => Blocks per hour
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 2 * 60 || // 60 Blocks per hour
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.GetMaxTipAge()); // ~1440 blocks behind -> 2 x fork detection time
if (!state)
lockIBDState = true;
Expand Down Expand Up @@ -2891,7 +2891,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin

int64_t nTime1 = GetTimeMicros();
nTimeConnect += nTime1 - nTimeStart;
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n",
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n",
(unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(),
nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs - 1), nTimeConnect * 0.000001);

Expand All @@ -2909,7 +2909,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin

int64_t nTime2 = GetTimeMicros();
nTimeVerify += nTime2 - nTimeStart;
LogPrint("bench", " - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime2 - nTimeStart),
LogPrint("bench", " - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime2 - nTimeStart),
nInputs <= 1 ? 0 : 0.001 * (nTime2 - nTimeStart) / (nInputs - 1), nTimeVerify * 0.000001);

//IMPORTANT NOTE: Nothing before this point should actually store to disk (or even memory)
Expand Down Expand Up @@ -2942,7 +2942,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin

int64_t nTime3 = GetTimeMicros();
nTimeIndex += nTime3 - nTime2;
LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);

// Watch for changes to the previous coinbase transaction.
static uint256 hashPrevBestCoinBase;
Expand All @@ -2951,7 +2951,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin

int64_t nTime4 = GetTimeMicros();
nTimeCallbacks += nTime4 - nTime3;
LogPrint("bench", " - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeCallbacks * 0.000001);
LogPrint("bench", " - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeCallbacks * 0.000001);

return true;
}
Expand Down Expand Up @@ -3532,11 +3532,14 @@ void static UpdateTip(CBlockIndex* pindexNew)
mempool.AddTransactionsUpdated(1);

if (fDebug)
LogPrintf("%s: new best=%s height=%d log2_work=%.8g tx=%lu date=%s progress=%f cache=%.1fMiB(%utx)\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble()) / log(2.0), (unsigned long)chainActive.Tip()->nChainTx,
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
Checkpoints::GuessVerificationProgress(Params().GetTxData(), chainActive.Tip()), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1 << 20)), pcoinsTip->GetCacheSize());

LogPrintf("%s:\n", __func__);
LogPrintf("New Best Block: %s\n", chainActive.Tip()->GetBlockHash().ToString());
LogPrintf("Height: %d\n", chainActive.Height());
LogPrintf("log2_work: %.8g\n", log(chainActive.Tip()->nChainWork.getdouble()) / log(2.0));
LogPrintf("tx: %lu\n", (unsigned long)chainActive.Tip()->nChainTx);
LogPrintf("date: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()));
LogPrintf("progress: %f\n", Checkpoints::GuessVerificationProgress(Params().GetTxData(), chainActive.Tip()));
LogPrintf("cache: %.1fMiB(%utx)\n", pcoinsTip->DynamicMemoryUsage() * (1.0 / (1 << 20)), pcoinsTip->GetCacheSize());
cvBlockChange.notify_all();

// Check the version of the last 100 blocks to see if we need to upgrade:
Expand Down Expand Up @@ -3679,7 +3682,7 @@ bool static ConnectTip(CValidationState& state, CBlockIndex* pindexNew, const CB
int64_t nTime6 = GetTimeMicros();
nTimePostConnect += nTime6 - nTime5;
nTimeTotal += nTime6 - nTime1;
LogPrint("bench", " - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
LogPrint("bench", "- Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001);

return true;
Expand Down Expand Up @@ -4972,8 +4975,8 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
CAmount stakedBalance;

if (!CheckProofOfStake(block, hashProofOfStake, listStake, stakedBalance)){
if (nHeight < 493000)
return state.DoS(1, error("%s: proof of stake check failed", __func__));
if (IsInitialBlockDownload())
return state.DoS(0, error("%s: proof of stake check failed", __func__));
return state.DoS(100, error("%s: proof of stake check failed", __func__));
}

Expand Down Expand Up @@ -5034,7 +5037,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
}

if (fDebug) {
LogPrintf("AcceptBlock block: %d<-- \n",nHeight);
LogPrintf("AcceptBlock block: %d \n",nHeight);
}
return true;
}
Expand Down Expand Up @@ -6530,7 +6533,7 @@ bool static ProcessMessageGetHeaders(CNode* pfrom, string strCommand, CDataStrea
// we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
vector<CBlock> vHeaders;
int nLimit = MAX_HEADERS_RESULTS;
if (pindex != NULL)
if (pindex != NULL)
LogPrint("net", "getheaders for block %d with hash %s from peerId=%d\n", pindex->nHeight, (locator.IsNull() ? hashStop.ToString() : pindex->GetBlockHash().ToString()), pfrom->id);
for (; pindex; pindex = chainActive.Next(pindex)) {
vHeaders.push_back(pindex->GetBlockHeader());
Expand Down
Loading

0 comments on commit 5905d17

Please sign in to comment.