aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/txrequest.cpp16
-rw-r--r--src/util/hasher.h2
2 files changed, 6 insertions, 12 deletions
diff --git a/src/txrequest.cpp b/src/txrequest.cpp
index 4c94d4562d..b9a41f26ff 100644
--- a/src/txrequest.cpp
+++ b/src/txrequest.cpp
@@ -72,16 +72,10 @@ struct Announcement {
/** Whether this is a wtxid request. */
const bool m_is_wtxid : 1;
- /** What state this announcement is in.
- * This is a uint8_t instead of a State to silence a GCC warning in versions prior to 9.3.
- * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414 */
- uint8_t m_state : 3;
-
- /** Convert m_state to a State enum. */
- State GetState() const { return static_cast<State>(m_state); }
-
- /** Convert a State enum to a uint8_t and store it in m_state. */
- void SetState(State state) { m_state = static_cast<uint8_t>(state); }
+ /** What state this announcement is in. */
+ State m_state : 3;
+ State GetState() const { return m_state; }
+ void SetState(State state) { m_state = state; }
/** Whether this announcement is selected. There can be at most 1 selected peer per txhash. */
bool IsSelected() const
@@ -105,7 +99,7 @@ struct Announcement {
Announcement(const GenTxid& gtxid, NodeId peer, bool preferred, std::chrono::microseconds reqtime,
SequenceNumber sequence) :
m_txhash(gtxid.GetHash()), m_time(reqtime), m_peer(peer), m_sequence(sequence), m_preferred(preferred),
- m_is_wtxid(gtxid.IsWtxid()), m_state(static_cast<uint8_t>(State::CANDIDATE_DELAYED)) {}
+ m_is_wtxid{gtxid.IsWtxid()}, m_state{State::CANDIDATE_DELAYED} {}
};
//! Type alias for priorities.
diff --git a/src/util/hasher.h b/src/util/hasher.h
index 506ae9415d..3ad6d5bb94 100644
--- a/src/util/hasher.h
+++ b/src/util/hasher.h
@@ -45,7 +45,7 @@ public:
* a slight performance penalty (around 1.6%), but this is compensated by
* memory savings of about 9% which allow for a larger dbcache setting.
*
- * @see https://gcc.gnu.org/onlinedocs/gcc-9.2.0/libstdc++/manual/manual/unordered_associative.html
+ * @see https://gcc.gnu.org/onlinedocs/gcc-13.2.0/libstdc++/manual/manual/unordered_associative.html
*/
size_t operator()(const COutPoint& id) const noexcept {
return SipHashUint256Extra(k0, k1, id.hash, id.n);