aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index d12fc3ae9a..218dd67ba6 100644
--- a/src/net.h
+++ b/src/net.h
@@ -848,7 +848,7 @@ public:
void AddInventoryKnown(const CInv& inv)
{
- {
+ if (m_tx_relay != nullptr) {
LOCK(m_tx_relay->cs_tx_inventory);
m_tx_relay->filterInventoryKnown.insert(inv.hash);
}
@@ -856,7 +856,7 @@ public:
void PushInventory(const CInv& inv)
{
- if (inv.type == MSG_TX) {
+ if (inv.type == MSG_TX && m_tx_relay != nullptr) {
LOCK(m_tx_relay->cs_tx_inventory);
if (!m_tx_relay->filterInventoryKnown.contains(inv.hash)) {
m_tx_relay->setInventoryTxToSend.insert(inv.hash);