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.
| 36 | * COMPLETED. |
| 37 | */ |
| 38 | enum 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. |
| 54 | using SequenceNumber = uint64_t; |
no outgoing calls
no test coverage detected