Page MenuHomePhabricator

mempool: Pass in -mempoolexpiry instead of referencing gArgs
ClosedPublic

Authored by PiRK on Jan 26 2024, 16:13.

Details

Summary
  • Store the mempool expiry (-mempoolexpiry) in CTxMemPool as a std::chrono::seconds member.
  • Remove the requirement to explicitly specify a mempool expiry for LimitMempoolSize(...), just use the newly-introduced member.
  • Remove all now-unnecessary instances of: std::chrono::hours{gArgs.GetIntArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY)}
  • Rename DEFAULT_MEMPOOL_EXPIRY to indicate time unit

This is a partial backport of core#25290
https://github.com/bitcoin/bitcoin/pull/25290/commits/aa9141cd8185cb7ad532bc16feb9d302b05d9697
https://github.com/bitcoin/bitcoin/pull/25290/commits/1ecc77321deb61b9f6888e4e10752b9d972fd26e

Depends on D15300

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable