MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / State

Enum State

src/txrequest.cpp:42–55  ·  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

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

Callers 15

RemoveBlockRequestMethod · 0.70
BlockRequestedMethod · 0.70
FinalizeNodeMethod · 0.70
GetNodeStateStatsMethod · 0.70
NewPoWValidBlockMethod · 0.70
BlockCheckedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected