MCPcopy Create free account
hub / github.com/ElementsProject/elements / State

Enum State

src/txrequest.cpp:38–51  ·  view source on GitHub ↗

The various states a (txhash,peer) pair can be in. * * Note that CANDIDATE is split up into 3 substates (DELAYED, BEST, READY), allowing more efficient implementation. * Also note that the sorting order of ByTxHashView relies on the specific order of values in this enum. * * Expected behaviour is: * - When first announced by a peer, the state is CANDIDATE_DELAYED until reqtime is reached.

Source from the content-addressed store, hash-verified

36 * COMPLETED.
37 */
38enum class State : uint8_t {
39 /** A CANDIDATE announcement whose reqtime is in the future. */
40 CANDIDATE_DELAYED,
41 /** A CANDIDATE announcement that's not CANDIDATE_DELAYED or CANDIDATE_BEST. */
42 CANDIDATE_READY,
43 /** The best CANDIDATE for a given txhash; only if there is no REQUESTED announcement already for that txhash.
44 * The CANDIDATE_BEST is the highest-priority announcement among all CANDIDATE_READY (and _BEST) ones for that
45 * txhash. */
46 CANDIDATE_BEST,
47 /** A REQUESTED announcement. */
48 REQUESTED,
49 /** A COMPLETED announcement. */
50 COMPLETED,
51};
52
53//! Type alias for sequence numbers.
54using SequenceNumber = uint64_t;

Callers 15

RemoveBlockRequestMethod · 0.70
BlockRequestedMethod · 0.70
AddTxAnnouncementMethod · 0.70
FinalizeNodeMethod · 0.70
GetNodeStateStatsMethod · 0.70
FetchBlockMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected