[cleanup] Text for ~/.btcp/bitcoin.conf, whitespace

This commit is contained in:
Jon Layton 2018-07-21 14:17:40 -05:00
parent 88357cf1ca
commit 3ef8c14019
4 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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=<path-to-utxop-files> to your btcprivate.conf and restart");
LogPrintf("GetUTXOFileName(): UTXO path is not specified, add utxo-path=<path-to-utxo-files> 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<uint64_t>(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<std::pair<uint64_t, CScript> > txFromFile;
std::vector<std::pair<uint64_t, CScript>> 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<std::pair<uint64_t, CScript>&, const CTransaction&> fork_cmp_tuple;
for(int i = 0; i < recs; i++) {
for (int i = 0; i < recs; i++) {
std::pair<uint64_t, CScript>& rec = txFromFile[i];
const CTransaction& tx = *block.vtx[i];

View File

@ -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);

View File

@ -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