refactor: Replace magic number with named constant
Summary:
This is a backport of core#18077 [2/13]
https://github.com/bitcoin/bitcoin/pull/18077/commits/28e2961fd6a2a9101fc08fb748430989291aaf7e
Depends on D12069
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12070