Skip to content

Commit 34e33ab

Browse files
committed
Remove g_relay_txes
Also remove vestigial commend in init.cpp
1 parent 68334b3 commit 34e33ab

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/init.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,10 +1373,9 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
13731373
// is not yet setup and may end up being set up twice if we
13741374
// need to reindex later.
13751375

1376-
// see Step 2: parameter interactions for more information about these
13771376
fListen = args.GetBoolArg("-listen", DEFAULT_LISTEN);
13781377
fDiscover = args.GetBoolArg("-discover", true);
1379-
g_relay_txes = !args.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
1378+
const bool ignores_incoming_txs{args.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)};
13801379

13811380
assert(!node.banman);
13821381
node.banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME));
@@ -1386,7 +1385,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
13861385
assert(!node.fee_estimator);
13871386
// Don't initialize fee estimation with old data if we don't relay transactions,
13881387
// as they would never get updated.
1389-
if (g_relay_txes) node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();
1388+
if (!ignores_incoming_txs) node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();
13901389

13911390
assert(!node.mempool);
13921391
int check_ratio = std::min<int>(std::max<int>(args.GetArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
@@ -1398,7 +1397,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
13981397

13991398
assert(!node.peerman);
14001399
node.peerman = std::make_unique<PeerManager>(chainparams, *node.connman, node.banman.get(),
1401-
*node.scheduler, chainman, *node.mempool, !g_relay_txes);
1400+
*node.scheduler, chainman, *node.mempool, ignores_incoming_txs);
14021401
RegisterValidationInterface(node.peerman.get());
14031402

14041403
// sanitize comments per BIP-0014, format user agent and check total size

src/net.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ static const uint64_t RANDOMIZER_ID_ADDRCACHE = 0x1cf2e4ddd306dda9ULL; // SHA256
111111
//
112112
bool fDiscover = true;
113113
bool fListen = true;
114-
bool g_relay_txes = !DEFAULT_BLOCKSONLY;
115114
RecursiveMutex cs_mapLocalHost;
116115
std::map<CNetAddr, LocalServiceInfo> mapLocalHost GUARDED_BY(cs_mapLocalHost);
117116
static bool vfLimited[NET_MAX] GUARDED_BY(cs_mapLocalHost) = {};

src/net.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
665665

666666
extern bool fDiscover;
667667
extern bool fListen;
668-
extern bool g_relay_txes;
669668

670669
/** Subversion as sent to the P2P network in `version` messages */
671670
extern std::string strSubVersion;

0 commit comments

Comments
 (0)