From b05a89b2def301704df8f22f05a45ccf891c2b83 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 28 Apr 2015 14:47:17 +0000 Subject: [PATCH] Non-grammatical language improvements --- doc/gitian-building.md | 2 +- doc/release-process.md | 2 +- src/addrman.h | 2 +- src/base58.h | 6 +++--- src/chain.h | 2 +- src/chainparams.cpp | 9 +++++---- src/chainparams.h | 2 +- src/checkpoints.cpp | 7 ++++--- src/main.cpp | 25 +++++++++++++------------ src/qt/sendcoinsdialog.cpp | 2 +- src/rpcserver.cpp | 4 ++-- 11 files changed, 33 insertions(+), 30 deletions(-) diff --git a/doc/gitian-building.md b/doc/gitian-building.md index b9fbcb30aa..1fa5b5f989 100644 --- a/doc/gitian-building.md +++ b/doc/gitian-building.md @@ -393,4 +393,4 @@ Uploading signatures After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the [bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if that's not possible create a pull -request. You can also mail the files to me (laanwj@gmail.com) and I'll commit them. +request. You can also mail the files to Wladimir (laanwj@gmail.com) and he will commit them. diff --git a/doc/release-process.md b/doc/release-process.md index 5dad9bf5de..cdcee0ec36 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -164,4 +164,4 @@ Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spur - Add release notes for the new version to the directory `doc/release-notes` in git master -- Celebrate +- Celebrate diff --git a/src/addrman.h b/src/addrman.h index 98df370c7d..b72dda49d1 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -105,7 +105,7 @@ public: /** Stochastic address manager * * Design goals: - * * Keep the address tables in-memory, and asynchronously dump the entire to able in peers.dat. + * * Keep the address tables in-memory, and asynchronously dump the entire table to peers.dat. * * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. * * To that end: diff --git a/src/base58.h b/src/base58.h index 8de90046a9..787979c827 100644 --- a/src/base58.h +++ b/src/base58.h @@ -6,10 +6,10 @@ /** * Why base-58 instead of standard base-64 encoding? * - Don't want 0OIl characters that look the same in some fonts and - * could be used to create visually identical looking account numbers. - * - A string with non-alphanumeric characters is not as easily accepted as an account number. + * could be used to create visually identical looking data. + * - A string with non-alphanumeric characters is not as easily accepted as input. * - E-mail usually won't line-break if there's no punctuation to break at. - * - Double-clicking selects the whole number as one word if it's all alphanumeric. + * - Double-clicking selects the whole string as one word if it's all alphanumeric. */ #ifndef BITCOIN_BASE58_H #define BITCOIN_BASE58_H diff --git a/src/chain.h b/src/chain.h index 02f53cd2f2..01be2d6e5c 100644 --- a/src/chain.h +++ b/src/chain.h @@ -74,7 +74,7 @@ enum BlockStatus { */ BLOCK_VALID_TRANSACTIONS = 3, - //! Outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30. + //! Outputs do not overspend inputs, no double spends, coinbase output ok, no immature coinbase spends, BIP30. //! Implies all parents are also at least CHAIN. BLOCK_VALID_CHAIN = 4, diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 589c7b5472..a9dd4c257a 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -112,7 +112,7 @@ public: /** * The message start string is designed to be unlikely to occur in normal data. * The characters are rarely used upper ASCII, not valid as UTF-8, and produce - * a large 4-byte int at any alignment. + * a large 32-bit integer with any alignment. */ pchMessageStart[0] = 0xf9; pchMessageStart[1] = 0xbe; @@ -124,9 +124,10 @@ public: nPruneAfterHeight = 100000; /** - * Build the genesis block. Note that the output of the genesis coinbase cannot - * be spent as it did not originally exist in the database. - * + * Build the genesis block. Note that the output of its generation + * transaction cannot be spent since it did not originally exist in the + * database. + * * CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1) * CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0) * CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73) diff --git a/src/chainparams.h b/src/chainparams.h index 2951339104..1b03900990 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -56,7 +56,7 @@ public: bool MiningRequiresPeers() const { return fMiningRequiresPeers; } /** Default value for -checkmempool and -checkblockindex argument */ bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; } - /** Make standard checks */ + /** Policy: Filter transactions that do not match well-defined patterns */ bool RequireStandard() const { return fRequireStandard; } int64_t PruneAfterHeight() const { return nPruneAfterHeight; } /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */ diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 71579bb309..e3d42c2957 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -15,9 +15,10 @@ namespace Checkpoints { /** - * How many times we expect transactions after the last checkpoint to - * be slower. This number is a compromise, as it can't be accurate for - * every system. When reindexing from a fast disk with a slow CPU, it + * How many times slower we expect checking transactions after the last + * checkpoint to be (from checking signatures, which is skipped up to the + * last checkpoint). This number is a compromise, as it can't be accurate + * for every system. When reindexing from a fast disk with a slow CPU, it * can be up to 20, while when downloading from a slow network with a * fast multicore CPU, it won't be much higher than 1. */ diff --git a/src/main.cpp b/src/main.cpp index 263c2abf6f..07156a9af2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -142,8 +142,9 @@ namespace { uint32_t nBlockSequenceId = 1; /** - * Sources of received blocks, to be able to send them reject messages or ban - * them, if processing happens afterwards. Protected by cs_main. + * Sources of received blocks, saved to be able to send them reject + * messages or ban them when processing happens afterwards. Protected by + * cs_main. */ map mapBlockSource; @@ -389,7 +390,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vectorpindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock); if (state->pindexLastCommonBlock == state->pindexBestKnownBlock) return; @@ -1721,7 +1722,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin // already refuses previously-known transaction ids entirely. // This rule was originally applied to all blocks with a timestamp after March 15, 2012, 0:00 UTC. // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the - // two in the chain that violate it. This prevents exploiting the issue against nodes in their + // two in the chain that violate it. This prevents exploiting the issue against nodes during their // initial block download. bool fEnforceBIP30 = (!pindex->phashBlock) || // Enforce on CreateNewBlock invocations which don't have a hash. !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256S("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) || @@ -2315,7 +2316,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) { } // The resulting new best tip may not be in setBlockIndexCandidates anymore, so - // add them again. + // add it again. BlockMap::iterator it = mapBlockIndex.begin(); while (it != mapBlockIndex.end()) { if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) { @@ -3745,7 +3746,7 @@ void static ProcessGetData(CNode* pfrom) // no response } - // Trigger them to send a getblocks request for the next batch of inventory + // Trigger the peer node to send a getblocks request for the next batch of inventory if (inv.hash == pfrom->hashContinue) { // Bypass PushInventory, this must send even if redundant, @@ -4141,8 +4142,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); if (--nLimit <= 0) { - // When this block is requested, we'll send an inv that'll make them - // getblocks the next batch of inventory. + // When this block is requested, we'll send an inv that'll + // trigger the peer to getblocks the next batch of inventory. LogPrint("net", " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); pfrom->hashContinue = pindex->GetBlockHash(); break; @@ -4379,9 +4380,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // This asymmetric behavior for inbound and outbound connections was introduced // to prevent a fingerprinting attack: an attacker can send specific fake addresses - // to users' AddrMan and later request them by sending getaddr messages. - // Making users (which are behind NAT and can only make outgoing connections) ignore - // getaddr message mitigates the attack. + // to users' AddrMan and later request them by sending getaddr messages. + // Making nodes which are behind NAT and can only make outgoing connections ignore + // the getaddr message mitigates the attack. else if ((strCommand == "getaddr") && (pfrom->fInbound)) { pfrom->vAddrToSend.clear(); @@ -4734,7 +4735,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle) { const Consensus::Params& consensusParams = Params().GetConsensus(); { - // Don't send anything until we get their version message + // Don't send anything until we get its version message if (pto->nVersion == 0) return true; diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 1a931695e1..7a33e3567b 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -517,7 +517,7 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn msgParams.first = tr("The total exceeds your balance when the %1 transaction fee is included.").arg(msgArg); break; case WalletModel::DuplicateAddress: - msgParams.first = tr("Duplicate address found: can only send to each address once per send operation."); + msgParams.first = tr("Duplicate address found: addresses should only be used once each."); break; case WalletModel::TransactionCreationFailed: msgParams.first = tr("Transaction creation failed!"); diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 61dda9125b..12a5c4aef9 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -912,8 +912,8 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn, { LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string()); /* Deter brute-forcing - If this results in a DoS the user really - shouldn't have their RPC port exposed. */ + We don't support exposing the RPC port, so this shouldn't result + in a DoS. */ MilliSleep(250); conn->stream() << HTTPError(HTTP_UNAUTHORIZED, false) << std::flush;