-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Per-peer block tracking, stalled block download detection, orphan pool limiting #3514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Magic number... why so high? In the later stages of block download I'd have thought a number close to 1 would be appropriate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be a further optimization, yes. |
||
/** 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 | ||
|
@@ -182,6 +187,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, | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really don't like the use of functions that clearly don't do what their name suggests they do.
What parts of this function are needed? And what would the function be called if it did what it is needing to do here?