Skip to content

Commit

Permalink
Merge pull request #8 from realbigsean/kzg-refactor
Browse files Browse the repository at this point in the history
fix overflow tests
  • Loading branch information
realbigsean authored Oct 20, 2023
2 parents 59737eb + e190823 commit 5e847da
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ mod test {
) -> (
BeaconChainHarness<DiskHarnessType<E>>,
Arc<OverflowLRUCache<T>>,
TempDir,
)
where
E: EthSpec,
Expand All @@ -984,15 +985,15 @@ mod test {
OverflowLRUCache::<T>::new(capacity, test_store, spec.clone())
.expect("should create cache"),
);
(harness, cache)
(harness, cache, chain_db_path)
}

#[tokio::test]
async fn overflow_cache_test_insert_components() {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = 4;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let (pending_block, blobs) = availability_pending_block(&harness).await;
let root = pending_block.import_data.block_root;
Expand Down Expand Up @@ -1104,7 +1105,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = 4;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let mut pending_blocks = VecDeque::new();
let mut pending_blobs = VecDeque::new();
Expand Down Expand Up @@ -1255,7 +1256,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = E::slots_per_epoch() as usize;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let n_epochs = 4;
let mut pending_blocks = VecDeque::new();
Expand Down Expand Up @@ -1395,7 +1396,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = E::slots_per_epoch() as usize;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let n_epochs = 4;
let mut pending_blocks = VecDeque::new();
Expand Down Expand Up @@ -1573,7 +1574,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = STATE_LRU_CAPACITY * 2;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let mut pending_blocks = VecDeque::new();
let mut states = Vec::new();
Expand Down

0 comments on commit 5e847da

Please sign in to comment.