@@ -95,12 +95,12 @@ class TxOrphanage {
95
95
96
96
/* * Get the total usage (weight) of all orphans. If an orphan has multiple announcers, its usage is
97
97
* only counted once within this total. */
98
- unsigned int TotalOrphanUsage () const { return m_total_orphan_usage; }
98
+ int64_t TotalOrphanUsage () const { return m_total_orphan_usage; }
99
99
100
100
/* * Total usage (weight) of orphans for which this peer is an announcer. If an orphan has multiple
101
101
* announcers, its weight will be accounted for in each PeerOrphanInfo, so the total of all
102
102
* peers' UsageByPeer() may be larger than TotalOrphanBytes(). */
103
- unsigned int UsageByPeer (NodeId peer) const {
103
+ int64_t UsageByPeer (NodeId peer) const {
104
104
auto peer_it = m_peer_orphanage_info.find (peer);
105
105
return peer_it == m_peer_orphanage_info.end () ? 0 : peer_it->second .m_total_usage ;
106
106
}
@@ -115,7 +115,7 @@ class TxOrphanage {
115
115
};
116
116
117
117
/* * Total usage (weight) of all entries in m_orphans. */
118
- unsigned int m_total_orphan_usage{0 };
118
+ int64_t m_total_orphan_usage{0 };
119
119
120
120
/* * Total number of <peer, tx> pairs. Can be larger than m_orphans.size() because multiple peers
121
121
* may have announced the same orphan. */
@@ -137,7 +137,7 @@ class TxOrphanage {
137
137
* PeerOrphanInfo, so the total of all peers' m_total_usage may be larger than
138
138
* m_total_orphan_size. If a peer is removed as an announcer, even if the orphan still
139
139
* remains in the orphanage, this number will be decremented. */
140
- unsigned int m_total_usage{0 };
140
+ int64_t m_total_usage{0 };
141
141
};
142
142
std::map<NodeId, PeerOrphanInfo> m_peer_orphanage_info;
143
143
0 commit comments