From c2c43e39b22c020123a07fcc802be49c0c4775d0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 6 Feb 2017 11:53:34 -0500 Subject: [PATCH] Access fRelayTxes with cs_filter lock in copyStats zcash: cherry picked from commit 512731bed0782f10092de35a960153b17ecc11eb zcash: https://github.com/bitcoin/bitcoin/pull/9708 --- src/net.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 386cabb42..aaf22de2c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -641,7 +641,10 @@ void CNode::copyStats(CNodeStats &stats) { stats.nodeid = this->GetId(); stats.nServices = nServices; - stats.fRelayTxes = fRelayTxes; + { + LOCK(cs_filter); + stats.fRelayTxes = fRelayTxes; + } stats.nLastSend = nLastSend; stats.nLastRecv = nLastRecv; stats.nTimeConnected = nTimeConnected;