A tweak to IsInitialBlockDownload
prevents taking cs_main
most of the time: it already remembers a negative result to save some work; doing so per-thread allows the check to be pulled out of the lock.
cs_feeFilter
is used only to guard minFeeFilter
, which is an integer. This is the simplest use case of an atomic
variable: the only guarantee needed is atomicity.