mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
refactor: Remove unused and add missing includes (#5293)
The codebase is filled with includes that are unused, and which thus can be removed. At the same time, the files often do not include all headers that contain the definitions used in those files. This change uses clang-format and clang-tidy to clean up the includes, with minor manual intervention to ensure the code compiles on all platforms.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <test/csf/BasicNetwork.h>
|
||||
#include <test/csf/Scheduler.h>
|
||||
#include <xrpl/beast/unit_test.h>
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_COLLECTOREF_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_COLLECTOREF_H_INCLUDED
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <test/csf/Digraph.h>
|
||||
#include <xrpl/beast/unit_test.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_HISTOGRAM_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_HISTOGRAM_H_INCLUDED
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_PEER_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_PEER_H_INCLUDED
|
||||
|
||||
@@ -30,8 +31,10 @@
|
||||
#include <xrpld/consensus/Validations.h>
|
||||
#include <xrpl/beast/utility/WrappedSink.h>
|
||||
#include <xrpl/protocol/PublicKey.h>
|
||||
|
||||
#include <boost/container/flat_map.hpp>
|
||||
#include <boost/container/flat_set.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_PEERGROUP_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_PEERGROUP_H_INCLUDED
|
||||
|
||||
#include <test/csf/Peer.h>
|
||||
#include <test/csf/random.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_PROPOSAL_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_PROPOSAL_H_INCLUDED
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <test/csf/Scheduler.h>
|
||||
#include <xrpl/basics/ByteUtilities.h>
|
||||
#include <xrpl/beast/unit_test.h>
|
||||
|
||||
#include <set>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#define RIPPLE_TEST_CSF_SIMTIME_H_INCLUDED
|
||||
|
||||
#include <xrpl/beast/clock/manual_clock.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#define RIPPLE_TEST_CSF_UNL_H_INCLUDED
|
||||
|
||||
#include <test/csf/random.h>
|
||||
|
||||
#include <boost/container/flat_set.hpp>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
@@ -16,12 +16,16 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_TX_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_TX_H_INCLUDED
|
||||
|
||||
#include <xrpl/beast/hash/hash_append.h>
|
||||
#include <xrpl/beast/hash/uhash.h>
|
||||
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/iterator/function_output_iterator.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <ostream>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_VALIDATION_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_VALIDATION_H_INCLUDED
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_COLLECTORS_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_COLLECTORS_H_INCLUDED
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_EVENTS_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_EVENTS_H_INCLUDED
|
||||
|
||||
@@ -23,6 +24,7 @@
|
||||
#include <test/csf/Tx.h>
|
||||
#include <test/csf/Validation.h>
|
||||
#include <test/csf/ledgers.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <test/csf/Sim.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
#include <test/csf/ledgers.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <sstream>
|
||||
#include <test/csf/ledgers.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_LEDGERS_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_LEDGERS_H_INCLUDED
|
||||
|
||||
@@ -26,7 +27,9 @@
|
||||
#include <xrpl/basics/comparators.h>
|
||||
#include <xrpl/basics/tagged_integer.h>
|
||||
#include <xrpl/json/json_value.h>
|
||||
|
||||
#include <boost/bimap/bimap.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <set>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_SUBMITTERS_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_SUBMITTERS_H_INCLUDED
|
||||
|
||||
@@ -23,7 +24,9 @@
|
||||
#include <test/csf/Scheduler.h>
|
||||
#include <test/csf/SimTime.h>
|
||||
#include <test/csf/Tx.h>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
namespace csf {
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_TEST_CSF_TIMERS_H_INCLUDED
|
||||
#define RIPPLE_TEST_CSF_TIMERS_H_INCLUDED
|
||||
|
||||
#include <test/csf/Scheduler.h>
|
||||
#include <test/csf/SimTime.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user