Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Sep 26, 2024
1 parent 73e04ed commit e770e41
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/optimism/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ workspace = true
reth-primitives.workspace = true

[dev-dependencies]
reth-codecs.workspace = true
reth-db-api.workspace = true
reth-prune-types.workspace = true
reth-stages-types.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion crates/optimism/storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@

#[cfg(test)]
mod tests {
use reth_codecs::{test_utils::UnusedBits, validate_bitflag_backwards_compat};
use reth_db_api::models::{
CompactClientVersion, CompactU256, CompactU64, StoredBlockBodyIndices, StoredBlockOmmers,
StoredBlockWithdrawals,
};
use reth_primitives::{Account, Receipt, ReceiptWithBloom, SealedHeader, Withdrawals};
use reth_primitives::{
Account, Receipt, ReceiptWithBloom, Requests, SealedHeader, Withdrawals,
};
use reth_prune_types::{PruneCheckpoint, PruneMode, PruneSegment};
use reth_stages_types::{
AccountHashingCheckpoint, CheckpointBlockRange, EntitiesCheckpoint, ExecutionCheckpoint,
Expand Down
19 changes: 9 additions & 10 deletions crates/storage/db-api/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,6 @@ add_wrapper_struct!((ClientVersion, CompactClientVersion));

#[cfg(test)]
mod tests {
use super::*;
use reth_codecs::{test_utils::UnusedBits, validate_bitflag_backwards_compat};
use reth_primitives::{Account, Receipt, ReceiptWithBloom, SealedHeader, Withdrawals};
use reth_prune_types::{PruneCheckpoint, PruneMode, PruneSegment};
use reth_stages_types::{
AccountHashingCheckpoint, CheckpointBlockRange, EntitiesCheckpoint, ExecutionCheckpoint,
HeadersCheckpoint, IndexHistoryCheckpoint, StageCheckpoint, StageUnitCheckpoint,
StorageHashingCheckpoint,
};

// each value in the database has an extra field named flags that encodes metadata about other
// fields in the value, e.g. offset and length.
//
Expand All @@ -323,6 +313,15 @@ mod tests {
#[cfg(not(feature = "optimism"))]
#[test]
fn test_ensure_backwards_compatibility() {
use super::*;
use reth_codecs::{test_utils::UnusedBits, validate_bitflag_backwards_compat};
use reth_primitives::{Account, Receipt, ReceiptWithBloom, SealedHeader, Withdrawals};
use reth_prune_types::{PruneCheckpoint, PruneMode, PruneSegment};
use reth_stages_types::{
AccountHashingCheckpoint, CheckpointBlockRange, EntitiesCheckpoint,
ExecutionCheckpoint, HeadersCheckpoint, IndexHistoryCheckpoint, StageCheckpoint,
StageUnitCheckpoint, StorageHashingCheckpoint,
};
assert_eq!(Account::bitflag_encoded_bytes(), 2);
assert_eq!(AccountHashingCheckpoint::bitflag_encoded_bytes(), 1);
assert_eq!(CheckpointBlockRange::bitflag_encoded_bytes(), 1);
Expand Down

0 comments on commit e770e41

Please sign in to comment.