From 3ef8c140197f83a2557f8e9b0ab26401b1e632ee Mon Sep 17 00:00:00 2001 From: Jon Layton Date: Sat, 21 Jul 2018 14:17:40 -0500 Subject: [PATCH] [cleanup] Text for ~/.btcp/bitcoin.conf, whitespace --- .github/ISSUE_TEMPLATE.md | 6 +++--- src/fork.cpp | 14 +++++++------- src/fork.h | 2 +- src/pow.cpp | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index d340e0b27..9b8ea1d22 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -34,9 +34,9 @@ Run `btpcd --version` to find out - Compiler version (gcc -version): ### Any extra information that might be useful in the debugging process. -This includes the relevant contents of `~/.btcprivate/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site. +This includes the relevant contents of `~/.btcp/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site. Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable. -### Do you have a back up of `~/.btcprivate` directory and/or take a VM snapshot? -- Backing up / making a copy of the `~/.btcprivate` directory might help make the problem reproducible. Please redact appropriately. +### Do you have a back up of `~/.btcp` directory and/or take a VM snapshot? +- Backing up / making a copy of the `~/.btcp` directory might help make the problem reproducible. Please redact appropriately. - Taking a VM snapshot is really helpful for interactively testing fixes diff --git a/src/fork.cpp b/src/fork.cpp index 58ca4aae7..321bca0b7 100644 --- a/src/fork.cpp +++ b/src/fork.cpp @@ -23,7 +23,7 @@ std::string GetUTXOFileName(int nHeight, const CChainParams& chainparams) boost::filesystem::path utxo_path(GetDataDir() / "utxo_snapshot"); if (utxo_path.empty() || !utxo_path.has_filename()) { - LogPrintf("GetUTXOFileName(): UTXO path is not specified, add utxo-path= to your btcprivate.conf and restart"); + LogPrintf("GetUTXOFileName(): UTXO path is not specified, add utxo-path= to your bitcoin.conf and restart"); return ""; } @@ -35,7 +35,7 @@ std::string GetUTXOFileName(int nHeight, const CChainParams& chainparams) return utxo_file.generic_string(); } -inline uint64_t bytes2uint64(char *array) +inline uint64_t bytes2uint64(char* array) { uint64_t x = static_cast(array[0]) & 0x00000000000000ff | @@ -50,11 +50,11 @@ inline uint64_t bytes2uint64(char *array) } bool ContextualCheckBlockFork(const CBlock& block, CValidationState& state, - const CChainParams& chainparams, const CBlockIndex * pindexprev) + const CChainParams& chainparams, const CBlockIndex* pindexprev) { bool fExpensiveChecks = true; if (fCheckpointsEnabled) { - CBlockIndex * pindexLastCheckpoint = Checkpoints::GetLastCheckpoint(chainparams.Checkpoints()); + CBlockIndex* pindexLastCheckpoint = Checkpoints::GetLastCheckpoint(chainparams.Checkpoints()); if (pindexLastCheckpoint && pindexLastCheckpoint->GetAncestor(pindexprev->nHeight) == pindexprev) { // This block is an ancestor of a checkpoint: disable script checks fExpensiveChecks = false; @@ -63,7 +63,7 @@ bool ContextualCheckBlockFork(const CBlock& block, CValidationState& state, int nHeight = pindexprev->nHeight + 1; if (fExpensiveChecks && isForkBlock(nHeight, chainparams.ForkStartHeight(), chainparams.ForkHeightRange())) { - //if block is in forking region validate it agains file records + // If block is in forking region, validate it against file records std::string utxo_file_path = GetUTXOFileName(nHeight, chainparams); std::ifstream if_utxo(utxo_file_path, std::ios::binary | std::ios::in); @@ -71,7 +71,7 @@ bool ContextualCheckBlockFork(const CBlock& block, CValidationState& state, LogPrintf("AcceptBlock(): FORK Block - Validating block - %u / %s with UTXO file - %s\n", nHeight, block.GetHash().ToString(), utxo_file_path); - std::vector > txFromFile; + std::vector> txFromFile; txFromFile.reserve(FORK_CB_PER_BLOCK); int recs = 0; @@ -123,7 +123,7 @@ bool ContextualCheckBlockFork(const CBlock& block, CValidationState& state, int txid = 0; typedef boost::tuple&, const CTransaction&> fork_cmp_tuple; - for(int i = 0; i < recs; i++) { + for (int i = 0; i < recs; i++) { std::pair& rec = txFromFile[i]; const CTransaction& tx = *block.vtx[i]; diff --git a/src/fork.h b/src/fork.h index ff3e2f960..063fc1b9e 100644 --- a/src/fork.h +++ b/src/fork.h @@ -27,7 +27,7 @@ inline bool isForkEnabled(int nHeight, int forkStartHeight) } bool ContextualCheckBlockFork(const CBlock& block, CValidationState& state, - const CChainParams& chainparams, const CBlockIndex * pindex); + const CChainParams& chainparams, const CBlockIndex* pindex); std::string GetUTXOFileName(int); diff --git a/src/pow.cpp b/src/pow.cpp index 53aac8c31..60952117e 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -30,7 +30,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead int nHeight = pindexLast->nHeight + 1; arith_uint256 proofOfWorkLimit; - if(!isForkEnabled(nHeight, chainparams.ForkStartHeight())) + if (!isForkEnabled(nHeight, chainparams.ForkStartHeight())) proofOfWorkLimit = UintToArith256(params.prePowLimit); else proofOfWorkLimit = UintToArith256(params.powLimit); @@ -46,15 +46,15 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead return nProofOfWorkLimit; // right at fork - else if(is_fork && !was_fork) + else if (is_fork && !was_fork) return nProofOfWorkLimit; // right post fork - else if(!is_fork && was_fork) + else if (!is_fork && was_fork) return nProofOfWorkLimit; // difficulty bomb - else if(pindexLast->nHeight > params.nPowDifficultyBombHeight) + else if (pindexLast->nHeight > params.nPowDifficultyBombHeight) return nProofOfWorkBomb; // testnet only