diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2019-03-08 15:30:36 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2019-08-28 13:41:58 -0400 |
commit | c4aa2ba82211ea5988ed7fe21e1b08bc3367e6d4 (patch) | |
tree | f0666a205ae658352be324c48aac5507110c7ab6 /src/net.h | |
parent | 4de0dbac9b286c42a9b10132b7c2d76712f1a319 (diff) |
[refactor] Change tx_relay structure to be unique_ptr
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -733,7 +733,7 @@ public: int64_t nextSendTimeFeeFilter{0}; }; - TxRelay m_tx_relay; + std::unique_ptr<TxRelay> m_tx_relay; // Used for headers announcements - unfiltered blocks to relay std::vector<uint256> vBlockHashesToAnnounce GUARDED_BY(cs_inventory); @@ -849,17 +849,17 @@ public: void AddInventoryKnown(const CInv& inv) { { - LOCK(m_tx_relay.cs_tx_inventory); - m_tx_relay.filterInventoryKnown.insert(inv.hash); + LOCK(m_tx_relay->cs_tx_inventory); + m_tx_relay->filterInventoryKnown.insert(inv.hash); } } void PushInventory(const CInv& inv) { if (inv.type == MSG_TX) { - LOCK(m_tx_relay.cs_tx_inventory); - if (!m_tx_relay.filterInventoryKnown.contains(inv.hash)) { - m_tx_relay.setInventoryTxToSend.insert(inv.hash); + LOCK(m_tx_relay->cs_tx_inventory); + if (!m_tx_relay->filterInventoryKnown.contains(inv.hash)) { + m_tx_relay->setInventoryTxToSend.insert(inv.hash); } } else if (inv.type == MSG_BLOCK) { LOCK(cs_inventory); |