From 99471fd308ee222f71908ae1f829167969baf02a Mon Sep 17 00:00:00 2001 From: Naviabheeman <45412531+Naviabheeman@users.noreply.github.com> Date: Tue, 20 Jun 2023 13:01:39 +0530 Subject: [PATCH] Change boost classes to std classes (#268) * replace boost::bind with td::bind and fix validation interface compilation * remove boost::chrono * change boost::variant to std::variant * Revert "remove boost::chrono" This reverts commit 434d8d77b8fc8d11c69dca0b3ba4c7e6618e1ef6. --- src/bench/block_assemble.cpp | 2 +- src/federationparams.cpp | 2 +- src/init.cpp | 7 ++-- src/key_io.cpp | 7 ++-- src/keystore.cpp | 2 +- src/primitives/xfield.cpp | 13 +++--- src/primitives/xfield.h | 12 +++--- src/qt/addresstablemodel.cpp | 2 +- src/qt/clientmodel.cpp | 14 +++---- src/qt/coincontroldialog.cpp | 4 +- src/qt/signverifymessagedialog.cpp | 5 ++- src/qt/splashscreen.cpp | 6 +-- src/qt/tapyrusgui.cpp | 4 +- src/qt/transactionrecord.cpp | 2 +- src/qt/transactiontablemodel.cpp | 4 +- src/qt/walletmodel.cpp | 12 +++--- src/rpc/mining.cpp | 2 +- src/rpc/misc.cpp | 2 +- src/rpc/rawtransaction.cpp | 8 ++-- src/rpc/server.cpp | 7 ++-- src/rpc/util.cpp | 4 +- src/rpc/util.h | 3 +- src/scheduler.cpp | 5 +-- src/scheduler.h | 2 +- src/script/standard.cpp | 6 +-- src/script/standard.h | 4 +- src/test/block_tests.cpp | 8 ++-- src/test/key_tests.cpp | 10 ++--- src/test/scheduler_tests.cpp | 17 ++++---- src/test/script_standard_tests.cpp | 24 ++++------- src/test/test_tapyrus.cpp | 2 +- src/test/xfield_tests.cpp | 4 +- src/torcontrol.cpp | 23 +++++------ src/validation.cpp | 8 ++-- src/validationinterface.cpp | 60 ++++++++++++++------------- src/wallet/rpcdump.cpp | 2 +- src/wallet/rpcwallet.cpp | 66 +++++++++++++++--------------- src/wallet/test/wallet_tests.cpp | 6 +-- src/wallet/wallet.cpp | 8 ++-- src/xfieldhistory.cpp | 2 +- src/xfieldhistory.h | 10 ++--- test/lint/pending-lint-includes.sh | 4 -- 42 files changed, 189 insertions(+), 206 deletions(-) diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp index 1a0e84c66d..43cc919ad1 100644 --- a/src/bench/block_assemble.cpp +++ b/src/bench/block_assemble.cpp @@ -93,7 +93,7 @@ static void AssembleBlock(benchmark::State& state) ::pcoinsdbview.reset(new CCoinsViewDB(1 << 23, true)); ::pcoinsTip.reset(new CCoinsViewCache(pcoinsdbview.get())); - thread_group.create_thread(boost::bind(&CScheduler::serviceQueue, &scheduler)); + thread_group.create_thread(std::bind(&CScheduler::serviceQueue, &scheduler)); GetMainSignals().RegisterBackgroundSignalScheduler(scheduler); LoadGenesisBlock(); CValidationState state; diff --git a/src/federationparams.cpp b/src/federationparams.cpp index 27a6a9be88..9eb1fb8348 100644 --- a/src/federationparams.cpp +++ b/src/federationparams.cpp @@ -156,7 +156,7 @@ bool CFederationParams::ReadGenesisBlock(std::string genesisHex) switch(genesis.xfield.xfieldType) { case TAPYRUS_XFIELDTYPES::AGGPUBKEY: { - std::vector* pubkey = &boost::get(genesis.xfield.xfieldValue).data; + std::vector* pubkey = &std::get(genesis.xfield.xfieldValue).data; if(!pubkey->size()) throw std::runtime_error("Aggregate Public Key for Signed Block is empty"); diff --git a/src/init.cpp b/src/init.cpp index 02a49f3d75..d26047e64a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -59,7 +59,6 @@ #include #include #include -#include #include #include @@ -1236,8 +1235,8 @@ bool AppInitMain() } // Start the lightweight task scheduler thread - CScheduler::Function serviceLoop = boost::bind(&CScheduler::serviceQueue, &scheduler); - threadGroup.create_thread(boost::bind(&TraceThread, "scheduler", serviceLoop)); + CScheduler::Function serviceLoop = std::bind(&CScheduler::serviceQueue, &scheduler); + threadGroup.create_thread(std::bind(&TraceThread, "scheduler", serviceLoop)); // Gather some entropy once per minute. scheduler.scheduleEvery([]{ @@ -1635,7 +1634,7 @@ bool AppInitMain() vImportFiles.push_back(strFile); } - threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles, fReloadxfield)); + threadGroup.create_thread(std::bind(&ThreadImport, vImportFiles, fReloadxfield)); // Wait for genesis block to be processed { diff --git a/src/key_io.cpp b/src/key_io.cpp index 2f4b76d6bc..7f82501096 100644 --- a/src/key_io.cpp +++ b/src/key_io.cpp @@ -10,8 +10,7 @@ #include