Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNineteen committed Jun 21, 2024
1 parent a4a2aa5 commit 36e5230
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
14 changes: 4 additions & 10 deletions src/accountsdb/db.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const Blake3 = std.crypto.hash.Blake3;
const Account = sig.core.Account;
const Hash = sig.core.hash.Hash;
const Slot = sig.core.time.Slot;
const Epoch = sig.core.time.Epoch;
const Pubkey = sig.core.pubkey.Pubkey;

const sysvars = sig.accounts_db.sysvars;
Expand All @@ -24,19 +23,19 @@ const BankIncrementalSnapshotPersistence = sig.accounts_db.snapshots.BankIncreme
const AllSnapshotFields = sig.accounts_db.snapshots.AllSnapshotFields;
const SnapshotFieldsAndPaths = sig.accounts_db.snapshots.SnapshotFieldsAndPaths;
const SnapshotFiles = sig.accounts_db.snapshots.SnapshotFiles;
const Bank = sig.accounts_db.bank.Bank;
const AccountIndex = sig.accounts_db.index.AccountIndex;
const AccountRef = sig.accounts_db.index.AccountRef;
const DiskMemoryAllocator = sig.accounts_db.index.DiskMemoryAllocator;
const parallelUnpackZstdTarBall = sig.accounts_db.snapshots.parallelUnpackZstdTarBall;

const spawnThreadTasks = sig.utils.thread.spawnThreadTasks;
const readDirectory = sig.utils.directory.readDirectory;
const ThreadPool = sig.sync.thread_pool.ThreadPool;
const RwMux = sig.sync.RwMux;
const Logger = sig.trace.log.Logger;
const printTimeEstimate = sig.time.estimate.printTimeEstimate;
const NestedHashTree = sig.common.merkle_tree.NestedHashTree;
const globalRegistry = sig.prometheus.registry.globalRegistry;
const GetMetricError = sig.prometheus.registry.GetMetricError;
const Counter = sig.prometheus.counter.Counter;

const AccountsDBConfig = @import("../cmd/config.zig").AccountsDBConfig;

Expand All @@ -55,11 +54,6 @@ const AccountCache = std.AutoHashMap(Slot, PubkeysAndAccounts);
const FileMap = std.AutoArrayHashMap(FileId, RwMux(AccountFile));
const DeadAccountsCounter = std.AutoArrayHashMap(Slot, u64);

const Registry = sig.prometheus.registry.Registry;
const globalRegistry = sig.prometheus.registry.globalRegistry;
const GetMetricError = sig.prometheus.registry.GetMetricError;
const Counter = sig.prometheus.counter.Counter;

pub const AccountsDBStats = struct {
number_files_flushed: *Counter,
number_files_cleaned: *Counter,
Expand Down Expand Up @@ -1395,8 +1389,8 @@ pub const AccountsDB = struct {
const did_remove = file_map.swapRemove(file_id);
std.debug.assert(did_remove);

// delete account
account_file.deinit();
// delete account

break :blk slot;
};
Expand Down
24 changes: 0 additions & 24 deletions src/accountsdb/fuzz.zig
Original file line number Diff line number Diff line change
@@ -1,36 +1,12 @@
const std = @import("std");

const sig = @import("../lib.zig");

const ArrayList = std.ArrayList;
const ArrayListUnmanaged = std.ArrayListUnmanaged;
const Blake3 = std.crypto.hash.Blake3;

const AccountsDB = sig.accounts_db.AccountsDB;
const Logger = sig.trace.Logger;
const Account = sig.core.Account;
const Hash = sig.core.hash.Hash;
const Slot = sig.core.time.Slot;
const Epoch = sig.core.time.Epoch;
const Pubkey = sig.core.pubkey.Pubkey;

const sysvars = sig.accounts_db.sysvars;
const AccountsDbFields = sig.accounts_db.snapshots.AccountsDbFields;
const AccountFileInfo = sig.accounts_db.snapshots.AccountFileInfo;
const AccountFile = sig.accounts_db.accounts_file.AccountFile;
const FileId = sig.accounts_db.accounts_file.FileId;
const AccountInFile = sig.accounts_db.accounts_file.AccountInFile;
const SnapshotFields = sig.accounts_db.snapshots.SnapshotFields;
const BankIncrementalSnapshotPersistence = sig.accounts_db.snapshots.BankIncrementalSnapshotPersistence;
const AllSnapshotFields = sig.accounts_db.snapshots.AllSnapshotFields;
const SnapshotFieldsAndPaths = sig.accounts_db.snapshots.SnapshotFieldsAndPaths;
const SnapshotFiles = sig.accounts_db.snapshots.SnapshotFiles;
const Bank = sig.accounts_db.bank.Bank;
const AccountIndex = sig.accounts_db.index.AccountIndex;
const AccountRef = sig.accounts_db.index.AccountRef;
const DiskMemoryAllocator = sig.accounts_db.index.DiskMemoryAllocator;
const parallelUnpackZstdTarBall = sig.accounts_db.snapshots.parallelUnpackZstdTarBall;

const MAX_FUZZ_TIME = std.time.ns_per_s * 100_000;

pub const TrackedAccount = struct {
Expand Down
4 changes: 0 additions & 4 deletions src/accountsdb/index.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ const std = @import("std");
const lib = @import("../lib.zig");

const ArrayList = std.ArrayList;
const Account = lib.core.account.Account;
const Hash = lib.core.hash.Hash;
const Slot = lib.core.time.Slot;
const Pubkey = lib.core.pubkey.Pubkey;
const AccountFile = lib.accounts_db.accounts_file.AccountFile;
const FileId = lib.accounts_db.accounts_file.FileId;
const RwMux = lib.sync.RwMux;

// RwMux(Vec<>)

// for sync reasons we need a stable head with a lock
pub const AccountReferenceHead = RwMux(struct {
ref_ptr: *AccountRef,
Expand Down
2 changes: 0 additions & 2 deletions src/cmd/cmd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const config = @import("config.zig");

const Atomic = std.atomic.Value;
const KeyPair = std.crypto.sign.Ed25519.KeyPair;

const AccountsDB = sig.accounts_db.AccountsDB;
const AccountsDBConfig = sig.accounts_db.AccountsDBConfig;
const AllSnapshotFields = sig.accounts_db.AllSnapshotFields;
const Bank = sig.accounts_db.Bank;
const ContactInfo = sig.gossip.ContactInfo;
Expand Down

0 comments on commit 36e5230

Please sign in to comment.