This is a backport of core#16378 [2/3]
https://github.com/bitcoin/bitcoin/pull/16378/commits/2c2a1445dc9d22c9d729b8301c8b3f54195bcfcf
Depends on D10263
I also added "fee_rate", because I will use it in the next commit instead of conf_target and estimate_mode to set the fee.