Skip to content

Fix compatibility for Boost 1.85 and above

Co-authored-by: Calin Culianu calin.culianu@gmail.com

Summary

This fixes the codebase to correctly compile against Boost 1.85. It is a follow-up to !1842 (merged). Without this commit the wallet cannot be built due to boost::filesystem API changes in 1.85.

This is a partial backport of https://reviews.bitcoinabc.org/D7362 based on https://github.com/bitcoin/bitcoin/pull/15880.

It also contains original work by me in order to avoid needing to pull in more backports to get this codebase to compile against Boost 1.85.

Also removed unused code as noted by ryanofsky.

Test Plan

  • Use Boost 1.85
  • Run cmake be sure codebase is using Boost 1.85. Ensure wallet is enabled with -DBUILD_BITCOIN_WALLET=ON to the cmake command-line.
  • Build everything and ensure it compiles and tests are ok: ninja all check-all
  • Try the above again against an earlier Boost such as 1.7x or 1.8x before 1.85 and ensure everything still works.

Merge request reports