Skip to content

Commit 5a34c78

Browse files
committed
chore: fix checks
1 parent d195bc9 commit 5a34c78

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

crates/flashblocks-rpc/src/cache.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ pub struct Cache {
1414
store: Arc<RwLock<HashMap<String, CacheEntry<Vec<u8>>>>>,
1515
}
1616

17-
impl Cache {
18-
pub fn new() -> Self {
17+
impl Default for Cache {
18+
fn default() -> Self {
1919
Self {
2020
store: Arc::new(RwLock::new(HashMap::new())),
2121
}
2222
}
23+
}
2324

25+
impl Cache {
2426
pub fn set<T: Serialize>(
2527
&self,
2628
key: &str,

crates/flashblocks-rpc/src/flashblocks.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ mod tests {
550550

551551
#[test]
552552
fn test_process_payload() {
553-
let cache = Arc::new(Cache::new());
553+
let cache = Arc::new(Cache::default());
554554

555555
let payload = create_first_payload();
556556

@@ -593,7 +593,7 @@ mod tests {
593593

594594
#[test]
595595
fn test_skip_initial_non_zero_index_payload() {
596-
let cache = Arc::new(Cache::new());
596+
let cache = Arc::new(Cache::default());
597597

598598
let metadata = Metadata {
599599
block_number: 1,

crates/node/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() {
2828
Cli::<OpChainSpecParser, FlashblocksRollupArgs>::parse()
2929
.run(|builder, flashblocks_rollup_args| async move {
3030
info!("Starting custom Base node");
31-
let cache = Arc::new(Cache::new());
31+
let cache = Arc::new(Cache::default());
3232
let op_node = OpNode::new(flashblocks_rollup_args.rollup_args.clone());
3333
let mut flashblocks_client = FlashblocksClient::new(Arc::clone(&cache));
3434

justfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ check: check-format check-clippy test
66
fix: fix-format fix-clippy
77

88
test:
9-
cargo test --all-features
9+
cargo test --workspace --all-features
1010

1111
check-format:
1212
cargo fmt --all -- --check

0 commit comments

Comments
 (0)