38
38
#include < silkworm/db/snapshots/body_queries.hpp>
39
39
#include < silkworm/db/snapshots/header_index.hpp>
40
40
#include < silkworm/db/snapshots/header_queries.hpp>
41
- #include < silkworm/db/snapshots/index_builder.hpp>
42
41
#include < silkworm/db/snapshots/repository.hpp>
43
42
#include < silkworm/db/snapshots/seg/seg_zip.hpp>
44
43
#include < silkworm/db/snapshots/snapshot_reader.hpp>
@@ -233,7 +232,7 @@ static std::unique_ptr<SnapshotBundleFactory> bundle_factory() {
233
232
}
234
233
235
234
void count_bodies (const SnapSettings& settings, int repetitions) {
236
- SnapshotRepository snapshot_repo{settings, bundle_factory ()};
235
+ SnapshotRepository snapshot_repo{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
237
236
snapshot_repo.reopen_folder ();
238
237
std::chrono::time_point start{std::chrono::steady_clock::now ()};
239
238
int num_bodies{0 };
@@ -257,7 +256,7 @@ void count_bodies(const SnapSettings& settings, int repetitions) {
257
256
}
258
257
259
258
void count_headers (const SnapSettings& settings, int repetitions) {
260
- SnapshotRepository snapshot_repo{settings, bundle_factory ()};
259
+ SnapshotRepository snapshot_repo{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
261
260
snapshot_repo.reopen_folder ();
262
261
std::chrono::time_point start{std::chrono::steady_clock::now ()};
263
262
int count{0 };
@@ -410,7 +409,7 @@ void lookup_header_by_hash(const SnapSettings& settings) {
410
409
411
410
std::optional<SnapshotPath> matching_snapshot;
412
411
std::optional<BlockHeader> matching_header;
413
- SnapshotRepository snapshot_repository{settings, bundle_factory ()};
412
+ SnapshotRepository snapshot_repository{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
414
413
snapshot_repository.reopen_folder ();
415
414
for (const SnapshotBundle& bundle : snapshot_repository.view_bundles_reverse ()) {
416
415
auto snapshot_and_index = bundle.snapshot_and_index (SnapshotType::headers);
@@ -439,7 +438,7 @@ void lookup_header_by_number(const SnapSettings& settings) {
439
438
SILK_INFO << " Lookup header number: " << block_number;
440
439
std::chrono::time_point start{std::chrono::steady_clock::now ()};
441
440
442
- SnapshotRepository snapshot_repository{settings, bundle_factory ()};
441
+ SnapshotRepository snapshot_repository{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
443
442
snapshot_repository.reopen_folder ();
444
443
const auto snapshot_and_index = snapshot_repository.find_segment (SnapshotType::headers, block_number);
445
444
if (snapshot_and_index) {
@@ -499,7 +498,7 @@ void lookup_body_in_one(const SnapSettings& settings, BlockNum block_number, con
499
498
}
500
499
501
500
void lookup_body_in_all (const SnapSettings& settings, BlockNum block_number) {
502
- SnapshotRepository snapshot_repository{settings, bundle_factory ()};
501
+ SnapshotRepository snapshot_repository{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
503
502
snapshot_repository.reopen_folder ();
504
503
505
504
std::chrono::time_point start{std::chrono::steady_clock::now ()};
@@ -606,7 +605,7 @@ void lookup_txn_by_hash_in_one(const SnapSettings& settings, const Hash& hash, c
606
605
}
607
606
608
607
void lookup_txn_by_hash_in_all (const SnapSettings& settings, const Hash& hash) {
609
- SnapshotRepository snapshot_repository{settings, bundle_factory ()};
608
+ SnapshotRepository snapshot_repository{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
610
609
snapshot_repository.reopen_folder ();
611
610
612
611
std::optional<SnapshotPath> matching_snapshot;
@@ -670,7 +669,7 @@ void lookup_txn_by_id_in_one(const SnapSettings& settings, uint64_t txn_id, cons
670
669
}
671
670
672
671
void lookup_txn_by_id_in_all (const SnapSettings& settings, uint64_t txn_id) {
673
- SnapshotRepository snapshot_repository{settings, bundle_factory ()};
672
+ SnapshotRepository snapshot_repository{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
674
673
snapshot_repository.reopen_folder ();
675
674
676
675
std::optional<SnapshotPath> matching_snapshot;
@@ -716,7 +715,7 @@ void lookup_transaction(const SnapSettings& settings) {
716
715
717
716
void sync (const SnapSettings& settings) {
718
717
std::chrono::time_point start{std::chrono::steady_clock::now ()};
719
- SnapshotRepository snapshot_repository{settings, bundle_factory ()};
718
+ SnapshotRepository snapshot_repository{settings, bundle_factory ()}; // NOLINT(cppcoreguidelines-slicing)
720
719
db::SnapshotSync snapshot_sync{&snapshot_repository, kMainnetConfig };
721
720
std::vector<std::string> snapshot_file_names;
722
721
if (settings.snapshot_file_name ) {
0 commit comments