Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.h
Show All 31 Lines | |||||
class CBlockIndex; | class CBlockIndex; | ||||
class CScheduler; | class CScheduler; | ||||
class PeerManager; | class PeerManager; | ||||
struct bilingual_str; | struct bilingual_str; | ||||
using NodePeerManager = PeerManager; | using NodePeerManager = PeerManager; | ||||
/** | /** | ||||
* Is avalanche enabled by default. | |||||
*/ | |||||
static constexpr bool AVALANCHE_DEFAULT_ENABLED = false; | |||||
/** | |||||
* Finalization score. | * Finalization score. | ||||
*/ | */ | ||||
static constexpr int AVALANCHE_FINALIZATION_SCORE = 128; | static constexpr int AVALANCHE_FINALIZATION_SCORE = 128; | ||||
/** | /** | ||||
* Maximum item that can be polled at once. | * Maximum item that can be polled at once. | ||||
*/ | */ | ||||
static constexpr size_t AVALANCHE_MAX_ELEMENT_POLL = 16; | static constexpr size_t AVALANCHE_MAX_ELEMENT_POLL = 16; | ||||
/** | |||||
* Avalanche default cooldown in milliseconds. | |||||
*/ | |||||
static constexpr size_t AVALANCHE_DEFAULT_COOLDOWN = 100; | |||||
/** | /** | ||||
* How long before we consider that a query timed out. | * How long before we consider that a query timed out. | ||||
*/ | */ | ||||
static constexpr std::chrono::milliseconds AVALANCHE_DEFAULT_QUERY_TIMEOUT{ | static constexpr std::chrono::milliseconds AVALANCHE_DEFAULT_QUERY_TIMEOUT{ | ||||
10000}; | 10000}; | ||||
/** | /** | ||||
* How many inflight requests can exist for one item. | * How many inflight requests can exist for one item. | ||||
▲ Show 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | private: | ||||
*/ | */ | ||||
uint256 buildLocalSighash(CNode *pfrom) const; | uint256 buildLocalSighash(CNode *pfrom) const; | ||||
friend struct ::avalanche::AvalancheTest; | friend struct ::avalanche::AvalancheTest; | ||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
/** | |||||
* Global avalanche instance. | |||||
*/ | |||||
extern std::unique_ptr<avalanche::Processor> g_avalanche; | |||||
#endif // BITCOIN_AVALANCHE_PROCESSOR_H | #endif // BITCOIN_AVALANCHE_PROCESSOR_H |