|
44 | 44 | #include <assert.h> |
45 | 45 | #include <optional> |
46 | 46 |
|
47 | | -#include <boost/algorithm/string/replace.hpp> |
48 | | - |
49 | 47 | using interfaces::FoundBlock; |
50 | 48 |
|
51 | 49 | namespace wallet { |
@@ -1018,22 +1016,22 @@ CWalletTx* CWallet::AddToWallet(CTransactionRef tx, const TxState& state, const |
1018 | 1016 |
|
1019 | 1017 | if (!strCmd.empty()) |
1020 | 1018 | { |
1021 | | - boost::replace_all(strCmd, "%s", hash.GetHex()); |
| 1019 | + ReplaceAll(strCmd, "%s", hash.GetHex()); |
1022 | 1020 | if (auto* conf = wtx.state<TxStateConfirmed>()) |
1023 | 1021 | { |
1024 | | - boost::replace_all(strCmd, "%b", conf->confirmed_block_hash.GetHex()); |
1025 | | - boost::replace_all(strCmd, "%h", ToString(conf->confirmed_block_height)); |
| 1022 | + ReplaceAll(strCmd, "%b", conf->confirmed_block_hash.GetHex()); |
| 1023 | + ReplaceAll(strCmd, "%h", ToString(conf->confirmed_block_height)); |
1026 | 1024 | } else { |
1027 | | - boost::replace_all(strCmd, "%b", "unconfirmed"); |
1028 | | - boost::replace_all(strCmd, "%h", "-1"); |
| 1025 | + ReplaceAll(strCmd, "%b", "unconfirmed"); |
| 1026 | + ReplaceAll(strCmd, "%h", "-1"); |
1029 | 1027 | } |
1030 | 1028 | #ifndef WIN32 |
1031 | 1029 | // Substituting the wallet name isn't currently supported on windows |
1032 | 1030 | // because windows shell escaping has not been implemented yet: |
1033 | 1031 | // https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-537384875 |
1034 | 1032 | // A few ways it could be implemented in the future are described in: |
1035 | 1033 | // https://github.com/bitcoin/bitcoin/pull/13339#issuecomment-461288094 |
1036 | | - boost::replace_all(strCmd, "%w", ShellEscape(GetName())); |
| 1034 | + ReplaceAll(strCmd, "%w", ShellEscape(GetName())); |
1037 | 1035 | #endif |
1038 | 1036 | std::thread t(runCommand, strCmd); |
1039 | 1037 | t.detach(); // thread runs free |
|
0 commit comments