The fee estimation accumulator, updates, and query are now implemented. I'll implement the unit tests tomorrow. This will satisfy both the Electrum and bitcoind API compat requirements.
It relies on full block query and prevout population to initialize and update the accumulator (e.g. 10k sample blocks). This aspect can be dramatically optimized without materially affecting this code (by just querying for output values vs. building entire txs/blocks). But this will probably be fast enough to call complete for now. Also still need to push some constants into config for better flexibility.
Also because so little of this is actually store dependent I may eventually restructure it into an independent class, maybe in system.
https://github.com/evoskuil/libbitcoin-database/blob/7ff01398172132c0fc459400cab0c008b2006ee7/include/bitcoin/database/impl/query/estimate.ipp