C++20 Round 4: enum class TxnOutType, remove boost string alg, boost::int64_t -> int64_t

- txnouttype -> enum class TxnOutType (NonStandard, PubKey, PubKeyHash, ScriptHash, MultiSig)
  Updated script.h/cpp, main.cpp, wallet.cpp, rpcrawtransaction.cpp, rpcwallet.cpp, multisig_tests.cpp
- boost::int64_t/uint64_t -> int64_t/uint64_t across all RPC files (7 files, 52 replacements)
- Replace all boost string algorithm includes with std:: equivalents:
  - Added TrimString(), ToLower(), ReplaceAll(), SplitString(), JoinStrings() to util.h
  - boost::trim -> TrimString() (bootstrap.cpp, trianglesrpc.cpp, rest.cpp)
  - boost::to_lower -> ToLower() (netbase.cpp, trianglesrpc.cpp)
  - boost::split/is_any_of -> SplitString() (rpcdump.cpp, trianglesrpc.cpp, rest.cpp)
  - boost::replace_all -> ReplaceAll() (main.cpp, wallet.cpp)
  - boost::algorithm::starts_with/ends_with -> std::string::starts_with/ends_with (rpcdump.cpp, smessage.cpp)
  - boost::algorithm::istarts_with -> case-insensitive lambda (init.cpp, qtipcserver.cpp)
  - boost::algorithm::join -> JoinStrings() (util.cpp)
- boost::bind -> lambda in trianglesrpc.cpp async_accept handler
- IsHex() parameter: const string& -> string_view
This commit is contained in:
2026-05-08 22:26:31 -07:00
parent 150828b806
commit 9d80ddb6ac
19 changed files with 224 additions and 209 deletions
+5 -5
View File
@@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
{
vector<valtype> solutions;
txnouttype whichType;
TxnOutType whichType;
CScript s;
s << key[0].GetPubKey() << OP_CHECKSIG;
BOOST_CHECK(Solver(s, whichType, solutions));
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
}
{
vector<valtype> solutions;
txnouttype whichType;
TxnOutType whichType;
CScript s;
s << OP_DUP << OP_HASH160 << key[0].GetPubKey().GetID() << OP_EQUALVERIFY << OP_CHECKSIG;
BOOST_CHECK(Solver(s, whichType, solutions));
@@ -207,7 +207,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
}
{
vector<valtype> solutions;
txnouttype whichType;
TxnOutType whichType;
CScript s;
s << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK(Solver(s, whichType, solutions));
@@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
}
{
vector<valtype> solutions;
txnouttype whichType;
TxnOutType whichType;
CScript s;
s << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK(Solver(s, whichType, solutions));
@@ -237,7 +237,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
}
{
vector<valtype> solutions;
txnouttype whichType;
TxnOutType whichType;
CScript s;
s << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
BOOST_CHECK(Solver(s, whichType, solutions));