CatapultServer
v0.5.0.1 (Elephant)
|
Height m_localHeight
Definition: CompareChains.cpp:172
CompareChainsOptions()
Creates compare-chains options.
Definition: CompareChains.h:31
Height m_commonBlockHeight
Definition: CompareChains.cpp:173
size_t m_nextFunctionId
Definition: CompareChains.cpp:170
const api::ChainApi & m_local
Definition: CompareChains.cpp:163
auto then(TContinuation continuation)
Configures continuation to run at the completion of this future.
Definition: Future.h:59
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
uint32_t MaxBlocksToAnalyze
Maximum number of blocks to analyze.
Definition: CompareChains.h:42
An api for retrieving chain information from a node.
Definition: ChainApi.h:40
const api::ChainApi & m_remote
Definition: CompareChains.cpp:164
thread::future< CompareChainsResult > CompareChains(const api::ChainApi &local, const api::ChainApi &remote, const CompareChainsOptions &options)
Compares two chains (local and remote) with the specified options.
Definition: CompareChains.cpp:177
CompareChainsOptions(uint32_t maxBlocksToAnalyze, uint32_t maxBlocksToRewrite)
Definition: CompareChains.h:36
uint32_t MaxBlocksToRewrite
Maximum number of blocks to rewrite.
Definition: CompareChains.h:45
future< std::vector< future< T > > > when_all(std::vector< future< T >> &&allFutures)
Returns a future that is signaled when all futures in allFutures complete.
Definition: FutureUtils.h:31
Level for logging debug events.
Level for logging trace events.
uint32_t CalculateMaxHashesToAnalyze(const CompareChainsOptions &options)
Returns max number of hashes to analyze.
Definition: CompareChains.cpp:34
ComparisonFunction m_comparisonFunctions[Num_Comparison_Functions]
Definition: CompareChains.cpp:169
uint64_t ForkDepth
Depth of the fork that needs to be resolved.
Definition: CompareChains.h:60
Provides a way to access the result of an asynchronous operation.
Definition: Future.h:29
#define CATAPULT_LOG_LEVEL(LEVEL)
Writes a log entry to the default logger with LEVEL severity.
Definition: Logging.h:336
EntityRange< Hash256 > HashRange
An entity range composed of hashes.
Definition: RangeTypes.h:35
ChainComparisonCode
Possible chain comparison end states.
Definition: ChainComparisonCode.h:60
Result of a chain comparison operation.
Definition: CompareChains.h:52
CompareChainsOptions m_options
Definition: CompareChains.cpp:165
size_t FindFirstDifferenceIndex(const EntityRange< TEntity > &lhs, const EntityRange< TEntity > &rhs)
Compares two entity ranges (lhs and rhs) and returns the index of the first non-equal element.
Definition: EntityRange.h:524
model::ChainScore ChainScore
Definition: tools/health/main.cpp:43
thread::promise< CompareChainsResult > m_promise
Definition: CompareChains.cpp:166
Definition: AddressExtractionExtension.cpp:28
ChainComparisonCode Code
End state of the chain comparison operation.
Definition: CompareChains.h:54
Options for comparing two chains.
Definition: CompareChains.h:29
Height CommonBlockHeight
Height of the last common block between the two chains.
Definition: CompareChains.h:57