aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-03-10 13:22:29 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-10 13:23:18 +0100
commitb76733d8e89487d0f03fb5ee09432bd4161acd87 (patch)
treee306b724b8c03d503f146f546a374841a5ad5ee2 /src/main.h
parent1795c69aaaed814d5fcf5a1c27984a190f155353 (diff)
parentf59d8f0b644d49324cabd19c58cf2262d49e1392 (diff)
downloadbitcoin-b76733d8e89487d0f03fb5ee09432bd4161acd87.tar.xz
Merge pull request #3514
f59d8f0 Per-peer block download tracking and stalled download detection. (Pieter Wuille)
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index cc1786d0a6..1b1aca4e05 100644
--- a/src/main.h
+++ b/src/main.h
@@ -59,6 +59,11 @@ static const int COINBASE_MATURITY = 100;
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
+/** Number of blocks that can be requested at any given time from a single peer. */
+static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128;
+/** Timeout in seconds before considering a block download peer unresponsive. */
+static const unsigned int BLOCK_DOWNLOAD_TIMEOUT = 60;
+
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
@@ -175,6 +180,9 @@ bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned in
bool AbortNode(const std::string &msg);
/** Get statistics from node state */
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats);
+/** Increase a node's misbehavior score. */
+void Misbehaving(NodeId nodeid, int howmuch);
+
/** (try to) add transaction to memory pool **/
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,