HomePhabricator

Revert "refactor: remove use of boost::algorithm::replace_first"

Description

Revert "refactor: remove use of boost::algorithm::replace_first"

Summary:
This reverts commit rABCe0303815ca4a547a6021fd89ee498e0c577e3a22.

The commit causes the following failure in the CI UBSAN build for an unknown reason:

[06:49:38]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-db_tests
[06:49:38]
[Step 1/1] cd /work/abc-ci-builds/build-ubsan/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-ubsan/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-ubsan/test/log && /usr/bin/cmake -E env UBSAN_OPTIONS=suppressions=/work/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:log_path=stdout /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-ubsan/test/log/bitcoin-db_tests.log /work/abc-ci-builds/build-ubsan/src/test/test_bitcoin --run_test=db_tests --logger=HRF,message:JUNIT,message,bitcoin-db_tests.xml --catch_system_errors=no
[06:49:38]
[Step 1/1] /work/abc-ci-builds/build-ubsan/src/test/test_bitcoin: symbol lookup error: /work/abc-ci-builds/build-ubsan/src/libbitcoinconsensus.so.0: undefined symbol: _Z17G_TRANSLATION_FUNB5cxx11
...
[06:49:38]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-rpc_tests
...
[06:49:38]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-wallet_tests
...
[06:49:38]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-validation_block_tests
...
[06:50:22]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-work_comparator_tests
...
[06:50:22]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-psbt_wallet_tests
...
[06:50:22]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-feerate_tests
...
[06:50:22]
[Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-scriptnum_tests
...

Test Plan:
With UBSAN:
ninja && ninja check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10793