Page MenuHomePhabricator

[refactor] init: Simplify coinsdb cache calculation
ClosedPublic

Authored by PiRK on Sep 9 2025, 13:49.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC9d4cbdd3a5f5: [refactor] init: Simplify coinsdb cache calculation
Summary

(total_cache / 4) + (1 << 23) is at least 8 MiB and nMaxCoinsDBCache is
also 8 MiB, so the minimum between the two will always be
nMaxCoinsDBCache. This is just a simplification and not changing the
result of the calculation.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>

This is a partial backport of core#31483
https://github.com/bitcoin/bitcoin/pull/31483/commits/8bd5f8a38ce903c05606841ebed1902398cb0b14

Depends on D18578

Test Plan

ninja all check-all

Diff Detail

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