@@ -250,7 +250,6 @@ class CNodeStats
250
250
public:
251
251
NodeId nodeid;
252
252
ServiceFlags nServices;
253
- bool fRelayTxes ;
254
253
std::chrono::seconds m_last_send;
255
254
std::chrono::seconds m_last_recv;
256
255
std::chrono::seconds m_last_tx_time;
@@ -271,7 +270,6 @@ class CNodeStats
271
270
NetPermissionFlags m_permissionFlags;
272
271
std::chrono::microseconds m_last_ping_time;
273
272
std::chrono::microseconds m_min_ping_time;
274
- CAmount minFeeFilter;
275
273
// Our address, as reported by the peer
276
274
std::string addrLocal;
277
275
// Address of this peer
@@ -548,35 +546,6 @@ class CNode
548
546
// Peer selected us as (compact blocks) high-bandwidth peer (BIP152)
549
547
std::atomic<bool > m_bip152_highbandwidth_from{false };
550
548
551
- struct TxRelay {
552
- mutable RecursiveMutex cs_filter;
553
- // We use fRelayTxes for two purposes -
554
- // a) it allows us to not relay tx invs before receiving the peer's version message
555
- // b) the peer may tell us in its version message that we should not relay tx invs
556
- // unless it loads a bloom filter.
557
- bool fRelayTxes GUARDED_BY (cs_filter){false };
558
- std::unique_ptr<CBloomFilter> pfilter PT_GUARDED_BY (cs_filter) GUARDED_BY(cs_filter){nullptr };
559
-
560
- mutable RecursiveMutex cs_tx_inventory;
561
- CRollingBloomFilter filterInventoryKnown GUARDED_BY (cs_tx_inventory){50000 , 0.000001 };
562
- // Set of transaction ids we still have to announce.
563
- // They are sorted by the mempool before relay, so the order is not important.
564
- std::set<uint256> setInventoryTxToSend;
565
- // Used for BIP35 mempool sending
566
- bool fSendMempool GUARDED_BY (cs_tx_inventory){false };
567
- // Last time a "MEMPOOL" request was serviced.
568
- std::atomic<std::chrono::seconds> m_last_mempool_req{0s};
569
- std::chrono::microseconds nNextInvSend{0 };
570
-
571
- /* * Minimum fee rate with which to filter inv's to this node */
572
- std::atomic<CAmount> minFeeFilter{0 };
573
- CAmount lastSentFeeFilter{0 };
574
- std::chrono::microseconds m_next_send_feefilter{0 };
575
- };
576
-
577
- // m_tx_relay == nullptr if we're not relaying transactions with this peer
578
- std::unique_ptr<TxRelay> m_tx_relay;
579
-
580
549
/* * Whether we should relay transactions to this peer (their version
581
550
* message did not include fRelay=false and this is not a block-relay-only
582
551
* connection). This only changes from false to true. It will never change
@@ -661,23 +630,6 @@ class CNode
661
630
nRefCount--;
662
631
}
663
632
664
- void AddKnownTx (const uint256& hash)
665
- {
666
- if (m_tx_relay != nullptr ) {
667
- LOCK (m_tx_relay->cs_tx_inventory );
668
- m_tx_relay->filterInventoryKnown .insert (hash);
669
- }
670
- }
671
-
672
- void PushTxInventory (const uint256& hash)
673
- {
674
- if (m_tx_relay == nullptr ) return ;
675
- LOCK (m_tx_relay->cs_tx_inventory );
676
- if (!m_tx_relay->filterInventoryKnown .contains (hash)) {
677
- m_tx_relay->setInventoryTxToSend .insert (hash);
678
- }
679
- }
680
-
681
633
void CloseSocketDisconnect ();
682
634
683
635
void CopyStats (CNodeStats& stats);
0 commit comments