Browse Source

Fix small typos in comments and error messages

Rebased-From: 67b2d819cdf6181e7f016e5366ce7479830893bd
Github-Pull: #5404
0.13
Pavel Janík 10 years ago committed by Wladimir J. van der Laan
parent
commit
bf7835c271
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/chain.h
  2. 8
      src/main.cpp
  3. 4
      src/txmempool.cpp
  4. 2
      src/uint256.cpp
  5. 2
      src/wallet_ismine.cpp

2
src/chain.h

@ -95,7 +95,7 @@ enum BlockStatus {
class CBlockIndex class CBlockIndex
{ {
public: public:
//! pointer to the hash of the block, if any. memory is owned by this CBlockIndex //! pointer to the hash of the block, if any. Memory is owned by this CBlockIndex
const uint256* phashBlock; const uint256* phashBlock;
//! pointer to the index of the predecessor of this block //! pointer to the index of the predecessor of this block

8
src/main.cpp

@ -1025,7 +1025,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
hash.ToString(), nFees, txMinFee), hash.ToString(), nFees, txMinFee),
REJECT_INSUFFICIENTFEE, "insufficient fee"); REJECT_INSUFFICIENTFEE, "insufficient fee");
// Continuously rate-limit free (really, very-low-fee)transactions // Continuously rate-limit free (really, very-low-fee) transactions
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to // This mitigates 'penny-flooding' -- sending thousands of free transactions just to
// be annoying or make others' transactions take longer to confirm. // be annoying or make others' transactions take longer to confirm.
if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize)) if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize))
@ -1050,7 +1050,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
} }
if (fRejectInsaneFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000) if (fRejectInsaneFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000)
return error("AcceptToMemoryPool: : insane fees %s, %d > %d", return error("AcceptToMemoryPool: insane fees %s, %d > %d",
hash.ToString(), hash.ToString(),
nFees, ::minRelayTxFee.GetFee(nSize) * 10000); nFees, ::minRelayTxFee.GetFee(nSize) * 10000);
@ -1058,7 +1058,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
// This is done last to help prevent CPU exhaustion denial-of-service attacks. // This is done last to help prevent CPU exhaustion denial-of-service attacks.
if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS, true)) if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS, true))
{ {
return error("AcceptToMemoryPool: : ConnectInputs failed %s", hash.ToString()); return error("AcceptToMemoryPool: ConnectInputs failed %s", hash.ToString());
} }
// Store transaction in memory // Store transaction in memory
pool.addUnchecked(hash, entry); pool.addUnchecked(hash, entry);
@ -2988,7 +2988,7 @@ bool InitBlockIndex() {
return error("LoadBlockIndex() : genesis block not accepted"); return error("LoadBlockIndex() : genesis block not accepted");
if (!ActivateBestChain(state, &block)) if (!ActivateBestChain(state, &block))
return error("LoadBlockIndex() : genesis block cannot be activated"); return error("LoadBlockIndex() : genesis block cannot be activated");
// Force a chainstate write so that when we VerifyDB in a moment, it doesnt check stale data // Force a chainstate write so that when we VerifyDB in a moment, it doesn't check stale data
return FlushStateToDisk(state, FLUSH_STATE_ALWAYS); return FlushStateToDisk(state, FLUSH_STATE_ALWAYS);
} catch(std::runtime_error &e) { } catch(std::runtime_error &e) {
return error("LoadBlockIndex() : failed to initialize block database: %s", e.what()); return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());

4
src/txmempool.cpp

@ -241,8 +241,8 @@ public:
} }
} }
//After new samples are added, we have to clear the sorted lists, // After new samples are added, we have to clear the sorted lists,
//so they'll be resorted the next time someone asks for an estimate // so they'll be resorted the next time someone asks for an estimate
sortedFeeSamples.clear(); sortedFeeSamples.clear();
sortedPrioritySamples.clear(); sortedPrioritySamples.clear();

2
src/uint256.cpp

@ -99,7 +99,7 @@ base_uint<BITS>& base_uint<BITS>::operator/=(const base_uint& b)
if (div_bits > num_bits) // the result is certainly 0. if (div_bits > num_bits) // the result is certainly 0.
return *this; return *this;
int shift = num_bits - div_bits; int shift = num_bits - div_bits;
div <<= shift; // shift so that div and nun align. div <<= shift; // shift so that div and num align.
while (shift >= 0) { while (shift >= 0) {
if (num >= div) { if (num >= div) {
num -= div; num -= div;

2
src/wallet_ismine.cpp

@ -74,7 +74,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
case TX_MULTISIG: case TX_MULTISIG:
{ {
// Only consider transactions "mine" if we own ALL the // Only consider transactions "mine" if we own ALL the
// keys involved. multi-signature transactions that are // keys involved. Multi-signature transactions that are
// partially owned (somebody else has a key that can spend // partially owned (somebody else has a key that can spend
// them) enable spend-out-from-under-you attacks, especially // them) enable spend-out-from-under-you attacks, especially
// in shared-wallet situations. // in shared-wallet situations.

Loading…
Cancel
Save