mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Check that tx_relay is initialized before access
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user