From 94e24fa7e812ae37db03a922eb789d3c92674407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:18:37 +0100 Subject: [PATCH] Move ascending bootstrap classes to `node/bootstrap/` --- nano/core_test/bootstrap_ascending.cpp | 3 ++- nano/core_test/throttle.cpp | 2 +- nano/node/CMakeLists.txt | 26 +++++++++---------- .../account_sets.cpp | 2 +- .../account_sets.hpp | 3 ++- .../common.hpp | 0 .../crawlers.hpp | 0 .../database_scan.cpp | 4 +-- .../database_scan.hpp | 0 .../frontier_scan.cpp | 2 +- .../frontier_scan.hpp | 2 +- .../peer_scoring.cpp | 2 +- .../peer_scoring.hpp | 0 .../service.cpp | 4 +-- .../service.hpp | 14 +++++----- .../throttle.cpp | 2 +- .../throttle.hpp | 0 nano/node/json_handler.cpp | 2 +- nano/node/message_processor.cpp | 2 +- nano/node/network.cpp | 2 +- nano/node/node.cpp | 2 +- nano/slow_test/bootstrap.cpp | 2 +- 22 files changed, 39 insertions(+), 37 deletions(-) rename nano/node/{bootstrap_ascending => bootstrap}/account_sets.cpp (99%) rename nano/node/{bootstrap_ascending => bootstrap}/account_sets.hpp (98%) rename nano/node/{bootstrap_ascending => bootstrap}/common.hpp (100%) rename nano/node/{bootstrap_ascending => bootstrap}/crawlers.hpp (100%) rename nano/node/{bootstrap_ascending => bootstrap}/database_scan.cpp (96%) rename nano/node/{bootstrap_ascending => bootstrap}/database_scan.hpp (100%) rename nano/node/{bootstrap_ascending => bootstrap}/frontier_scan.cpp (99%) rename nano/node/{bootstrap_ascending => bootstrap}/frontier_scan.hpp (97%) rename nano/node/{bootstrap_ascending => bootstrap}/peer_scoring.cpp (98%) rename nano/node/{bootstrap_ascending => bootstrap}/peer_scoring.hpp (100%) rename nano/node/{bootstrap_ascending => bootstrap}/service.cpp (99%) rename nano/node/{bootstrap_ascending => bootstrap}/service.hpp (95%) rename nano/node/{bootstrap_ascending => bootstrap}/throttle.cpp (94%) rename nano/node/{bootstrap_ascending => bootstrap}/throttle.hpp (100%) diff --git a/nano/core_test/bootstrap_ascending.cpp b/nano/core_test/bootstrap_ascending.cpp index 025510646..378bc0c27 100644 --- a/nano/core_test/bootstrap_ascending.cpp +++ b/nano/core_test/bootstrap_ascending.cpp @@ -2,7 +2,8 @@ #include #include #include -#include +#include +#include #include #include #include diff --git a/nano/core_test/throttle.cpp b/nano/core_test/throttle.cpp index 965ba1f5f..53492c6cd 100644 --- a/nano/core_test/throttle.cpp +++ b/nano/core_test/throttle.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/nano/node/CMakeLists.txt b/nano/node/CMakeLists.txt index 0d8880178..e6c91f37f 100644 --- a/nano/node/CMakeLists.txt +++ b/nano/node/CMakeLists.txt @@ -24,23 +24,23 @@ add_library( blockprocessor.cpp bootstrap_weights_beta.hpp bootstrap_weights_live.hpp + bootstrap/account_sets.hpp + bootstrap/account_sets.cpp bootstrap/bootstrap_config.hpp bootstrap/bootstrap_config.cpp bootstrap/bootstrap_server.hpp bootstrap/bootstrap_server.cpp - bootstrap_ascending/account_sets.hpp - bootstrap_ascending/account_sets.cpp - bootstrap_ascending/database_scan.hpp - bootstrap_ascending/database_scan.cpp - bootstrap_ascending/common.hpp - bootstrap_ascending/frontier_scan.hpp - bootstrap_ascending/frontier_scan.cpp - bootstrap_ascending/throttle.hpp - bootstrap_ascending/throttle.cpp - bootstrap_ascending/peer_scoring.hpp - bootstrap_ascending/peer_scoring.cpp - bootstrap_ascending/service.hpp - bootstrap_ascending/service.cpp + bootstrap/common.hpp + bootstrap/throttle.hpp + bootstrap/throttle.cpp + bootstrap/database_scan.hpp + bootstrap/database_scan.cpp + bootstrap/frontier_scan.hpp + bootstrap/frontier_scan.cpp + bootstrap/peer_scoring.hpp + bootstrap/peer_scoring.cpp + bootstrap/service.hpp + bootstrap/service.cpp cli.hpp cli.cpp common.hpp diff --git a/nano/node/bootstrap_ascending/account_sets.cpp b/nano/node/bootstrap/account_sets.cpp similarity index 99% rename from nano/node/bootstrap_ascending/account_sets.cpp rename to nano/node/bootstrap/account_sets.cpp index 4d0a276df..78960f72c 100644 --- a/nano/node/bootstrap_ascending/account_sets.cpp +++ b/nano/node/bootstrap/account_sets.cpp @@ -1,7 +1,7 @@ #include #include +#include #include -#include #include #include diff --git a/nano/node/bootstrap_ascending/account_sets.hpp b/nano/node/bootstrap/account_sets.hpp similarity index 98% rename from nano/node/bootstrap_ascending/account_sets.hpp rename to nano/node/bootstrap/account_sets.hpp index d83d3a889..c84045804 100644 --- a/nano/node/bootstrap_ascending/account_sets.hpp +++ b/nano/node/bootstrap/account_sets.hpp @@ -2,7 +2,8 @@ #include #include -#include +#include +#include #include #include diff --git a/nano/node/bootstrap_ascending/common.hpp b/nano/node/bootstrap/common.hpp similarity index 100% rename from nano/node/bootstrap_ascending/common.hpp rename to nano/node/bootstrap/common.hpp diff --git a/nano/node/bootstrap_ascending/crawlers.hpp b/nano/node/bootstrap/crawlers.hpp similarity index 100% rename from nano/node/bootstrap_ascending/crawlers.hpp rename to nano/node/bootstrap/crawlers.hpp diff --git a/nano/node/bootstrap_ascending/database_scan.cpp b/nano/node/bootstrap/database_scan.cpp similarity index 96% rename from nano/node/bootstrap_ascending/database_scan.cpp rename to nano/node/bootstrap/database_scan.cpp index 8501f828b..257e12bd4 100644 --- a/nano/node/bootstrap_ascending/database_scan.cpp +++ b/nano/node/bootstrap/database_scan.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include #include #include diff --git a/nano/node/bootstrap_ascending/database_scan.hpp b/nano/node/bootstrap/database_scan.hpp similarity index 100% rename from nano/node/bootstrap_ascending/database_scan.hpp rename to nano/node/bootstrap/database_scan.hpp diff --git a/nano/node/bootstrap_ascending/frontier_scan.cpp b/nano/node/bootstrap/frontier_scan.cpp similarity index 99% rename from nano/node/bootstrap_ascending/frontier_scan.cpp rename to nano/node/bootstrap/frontier_scan.cpp index 37ff59c19..e8e3fdce6 100644 --- a/nano/node/bootstrap_ascending/frontier_scan.cpp +++ b/nano/node/bootstrap/frontier_scan.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/nano/node/bootstrap_ascending/frontier_scan.hpp b/nano/node/bootstrap/frontier_scan.hpp similarity index 97% rename from nano/node/bootstrap_ascending/frontier_scan.hpp rename to nano/node/bootstrap/frontier_scan.hpp index 4fc0c7c1d..b49130db9 100644 --- a/nano/node/bootstrap_ascending/frontier_scan.hpp +++ b/nano/node/bootstrap/frontier_scan.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/nano/node/bootstrap_ascending/peer_scoring.cpp b/nano/node/bootstrap/peer_scoring.cpp similarity index 98% rename from nano/node/bootstrap_ascending/peer_scoring.cpp rename to nano/node/bootstrap/peer_scoring.cpp index 9fc2be605..5e6426093 100644 --- a/nano/node/bootstrap_ascending/peer_scoring.cpp +++ b/nano/node/bootstrap/peer_scoring.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include /* diff --git a/nano/node/bootstrap_ascending/peer_scoring.hpp b/nano/node/bootstrap/peer_scoring.hpp similarity index 100% rename from nano/node/bootstrap_ascending/peer_scoring.hpp rename to nano/node/bootstrap/peer_scoring.hpp diff --git a/nano/node/bootstrap_ascending/service.cpp b/nano/node/bootstrap/service.cpp similarity index 99% rename from nano/node/bootstrap_ascending/service.cpp rename to nano/node/bootstrap/service.cpp index 221eeaddf..0cfde7de6 100644 --- a/nano/node/bootstrap_ascending/service.cpp +++ b/nano/node/bootstrap/service.cpp @@ -3,8 +3,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/nano/node/bootstrap_ascending/service.hpp b/nano/node/bootstrap/service.hpp similarity index 95% rename from nano/node/bootstrap_ascending/service.hpp rename to nano/node/bootstrap/service.hpp index 6fef34ff0..6a1c84c93 100644 --- a/nano/node/bootstrap_ascending/service.hpp +++ b/nano/node/bootstrap/service.hpp @@ -7,14 +7,14 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/nano/node/bootstrap_ascending/throttle.cpp b/nano/node/bootstrap/throttle.cpp similarity index 94% rename from nano/node/bootstrap_ascending/throttle.cpp rename to nano/node/bootstrap/throttle.cpp index 715641a21..c9dfaf015 100644 --- a/nano/node/bootstrap_ascending/throttle.cpp +++ b/nano/node/bootstrap/throttle.cpp @@ -1,5 +1,5 @@ #include -#include +#include nano::bootstrap_ascending::throttle::throttle (std::size_t size) : successes_m{ size } diff --git a/nano/node/bootstrap_ascending/throttle.hpp b/nano/node/bootstrap/throttle.hpp similarity index 100% rename from nano/node/bootstrap_ascending/throttle.hpp rename to nano/node/bootstrap/throttle.hpp diff --git a/nano/node/json_handler.cpp b/nano/node/json_handler.cpp index 0ecacfe53..d4886d095 100644 --- a/nano/node/json_handler.cpp +++ b/nano/node/json_handler.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/nano/node/message_processor.cpp b/nano/node/message_processor.cpp index 469c55bd1..31ade92ff 100644 --- a/nano/node/message_processor.cpp +++ b/nano/node/message_processor.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/nano/node/network.cpp b/nano/node/network.cpp index b8f95f471..de7d8a2c0 100644 --- a/nano/node/network.cpp +++ b/nano/node/network.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/nano/node/node.cpp b/nano/node/node.cpp index dc5919a18..aefa851fb 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/nano/slow_test/bootstrap.cpp b/nano/slow_test/bootstrap.cpp index f4c035f1f..1e3075f31 100644 --- a/nano/slow_test/bootstrap.cpp +++ b/nano/slow_test/bootstrap.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include