@@ -72,16 +72,10 @@ struct Announcement {
72
72
/* * Whether this is a wtxid request. */
73
73
const bool m_is_wtxid : 1 ;
74
74
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; }
85
79
86
80
/* * Whether this announcement is selected. There can be at most 1 selected peer per txhash. */
87
81
bool IsSelected () const
@@ -105,7 +99,7 @@ struct Announcement {
105
99
Announcement (const GenTxid& gtxid, NodeId peer, bool preferred, std::chrono::microseconds reqtime,
106
100
SequenceNumber sequence) :
107
101
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} {}
109
103
};
110
104
111
105
// ! Type alias for priorities.
0 commit comments