@@ -72,16 +72,10 @@ struct Announcement {
7272 /* * Whether this is a wtxid request. */
7373 const bool m_is_wtxid : 1 ;
7474
75- /* * What state this announcement is in.
76- * This is a uint8_t instead of a State to silence a GCC warning in versions prior to 9.3.
77- * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414 */
78- uint8_t m_state : 3 ;
79-
80- /* * Convert m_state to a State enum. */
81- State GetState () const { return static_cast <State>(m_state); }
82-
83- /* * Convert a State enum to a uint8_t and store it in m_state. */
84- void SetState (State state) { m_state = static_cast <uint8_t >(state); }
75+ /* * What state this announcement is in. */
76+ State m_state : 3 ;
77+ State GetState () const { return m_state; }
78+ void SetState (State state) { m_state = state; }
8579
8680 /* * Whether this announcement is selected. There can be at most 1 selected peer per txhash. */
8781 bool IsSelected () const
@@ -105,7 +99,7 @@ struct Announcement {
10599 Announcement (const GenTxid& gtxid, NodeId peer, bool preferred, std::chrono::microseconds reqtime,
106100 SequenceNumber sequence) :
107101 m_txhash (gtxid.GetHash()), m_time(reqtime), m_peer(peer), m_sequence(sequence), m_preferred(preferred),
108- m_is_wtxid ( gtxid.IsWtxid()) , m_state( static_cast < uint8_t >( State::CANDIDATE_DELAYED)) {}
102+ m_is_wtxid{ gtxid.IsWtxid ()} , m_state{ State::CANDIDATE_DELAYED} {}
109103};
110104
111105// ! Type alias for priorities.
0 commit comments