Skip to content

Commit 5136522

Browse files
committed
[prep/config] remove -maxorphantx
The orphanage will no longer have a maximum number of unique orphans.
1 parent 8dd24c2 commit 5136522

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

src/init.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,6 @@ void SetupServerArgs(ArgsManager& argsman, bool can_listen_ipc)
490490
argsman.AddArg("-allowignoredconf", strprintf("For backwards compatibility, treat an unused %s file in the datadir as a warning, not an error.", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
491491
argsman.AddArg("-loadblock=<file>", "Imports blocks from external file on startup", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
492492
argsman.AddArg("-maxmempool=<n>", strprintf("Keep the transaction memory pool below <n> megabytes (default: %u)", DEFAULT_MAX_MEMPOOL_SIZE_MB), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
493-
argsman.AddArg("-maxorphantx=<n>", strprintf("Keep at most <n> unconnectable transactions in memory (default: %u)", DEFAULT_MAX_ORPHAN_TRANSACTIONS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
494493
argsman.AddArg("-mempoolexpiry=<n>", strprintf("Do not keep transactions in the mempool longer than <n> hours (default: %u)", DEFAULT_MEMPOOL_EXPIRY_HOURS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
495494
argsman.AddArg("-minimumchainwork=<hex>", strprintf("Minimum work assumed to exist on a valid chain in hex (default: %s, testnet3: %s, testnet4: %s, signet: %s)", defaultChainParams->GetConsensus().nMinimumChainWork.GetHex(), testnetChainParams->GetConsensus().nMinimumChainWork.GetHex(), testnet4ChainParams->GetConsensus().nMinimumChainWork.GetHex(), signetChainParams->GetConsensus().nMinimumChainWork.GetHex()), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
496495
argsman.AddArg("-par=<n>", strprintf("Set the number of script verification threads (0 = auto, up to %d, <0 = leave that many cores free, default: %d)",

src/net_processing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Warnings;
3636

3737
/** Whether transaction reconciliation protocol should be enabled by default. */
3838
static constexpr bool DEFAULT_TXRECONCILIATION_ENABLE{false};
39-
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
39+
/** Default maximum number of orphan transactions kept in memory */
4040
static const uint32_t DEFAULT_MAX_ORPHAN_TRANSACTIONS{100};
4141
/** Default number of non-mempool transactions to keep around for block reconstruction. Includes
4242
orphan, replaced, and rejected transactions. */

src/node/peerman_args.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& optio
1616
{
1717
if (auto value{argsman.GetBoolArg("-txreconciliation")}) options.reconcile_txs = *value;
1818

19-
if (auto value{argsman.GetIntArg("-maxorphantx")}) {
20-
options.max_orphan_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));
21-
}
22-
2319
if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) {
2420
options.max_extra_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));
2521
}

src/node/txorphanage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class TxOrphanage {
123123
unsigned int m_total_announcements{0};
124124

125125
/** Map from wtxid to orphan transaction record. Limited by
126-
* -maxorphantx/DEFAULT_MAX_ORPHAN_TRANSACTIONS */
126+
* DEFAULT_MAX_ORPHAN_TRANSACTIONS */
127127
std::map<Wtxid, OrphanTx> m_orphans;
128128

129129
struct PeerOrphanInfo {

0 commit comments

Comments
 (0)