@@ -25,10 +25,11 @@ use std::collections::HashSet;
25
25
use std:: convert:: TryInto ;
26
26
use std:: sync:: { Arc , LazyLock } ;
27
27
use std:: time:: Duration ;
28
+ use store:: database:: interface:: BeaconNodeBackend ;
28
29
use store:: metadata:: { SchemaVersion , CURRENT_SCHEMA_VERSION , STATE_UPPER_LIMIT_NO_RETAIN } ;
29
30
use store:: {
30
31
iter:: { BlockRootsIterator , StateRootsIterator } ,
31
- BlobInfo , DBColumn , HotColdDB , LevelDB , StoreConfig ,
32
+ BlobInfo , DBColumn , HotColdDB , StoreConfig ,
32
33
} ;
33
34
use tempfile:: { tempdir, TempDir } ;
34
35
use tokio:: time:: sleep;
@@ -46,15 +47,15 @@ static KEYPAIRS: LazyLock<Vec<Keypair>> =
46
47
type E = MinimalEthSpec ;
47
48
type TestHarness = BeaconChainHarness < DiskHarnessType < E > > ;
48
49
49
- fn get_store ( db_path : & TempDir ) -> Arc < HotColdDB < E , LevelDB < E > , LevelDB < E > > > {
50
+ fn get_store ( db_path : & TempDir ) -> Arc < HotColdDB < E , BeaconNodeBackend < E > , BeaconNodeBackend < E > > > {
50
51
get_store_generic ( db_path, StoreConfig :: default ( ) , test_spec :: < E > ( ) )
51
52
}
52
53
53
54
fn get_store_generic (
54
55
db_path : & TempDir ,
55
56
config : StoreConfig ,
56
57
spec : ChainSpec ,
57
- ) -> Arc < HotColdDB < E , LevelDB < E > , LevelDB < E > > > {
58
+ ) -> Arc < HotColdDB < E , BeaconNodeBackend < E > , BeaconNodeBackend < E > > > {
58
59
let hot_path = db_path. path ( ) . join ( "chain_db" ) ;
59
60
let cold_path = db_path. path ( ) . join ( "freezer_db" ) ;
60
61
let blobs_path = db_path. path ( ) . join ( "blobs_db" ) ;
@@ -73,7 +74,7 @@ fn get_store_generic(
73
74
}
74
75
75
76
fn get_harness (
76
- store : Arc < HotColdDB < E , LevelDB < E > , LevelDB < E > > > ,
77
+ store : Arc < HotColdDB < E , BeaconNodeBackend < E > , BeaconNodeBackend < E > > > ,
77
78
validator_count : usize ,
78
79
) -> TestHarness {
79
80
// Most tests expect to retain historic states, so we use this as the default.
@@ -85,7 +86,7 @@ fn get_harness(
85
86
}
86
87
87
88
fn get_harness_generic (
88
- store : Arc < HotColdDB < E , LevelDB < E > , LevelDB < E > > > ,
89
+ store : Arc < HotColdDB < E , BeaconNodeBackend < E > , BeaconNodeBackend < E > > > ,
89
90
validator_count : usize ,
90
91
chain_config : ChainConfig ,
91
92
) -> TestHarness {
@@ -244,7 +245,6 @@ async fn full_participation_no_skips() {
244
245
AttestationStrategy :: AllValidators ,
245
246
)
246
247
. await ;
247
-
248
248
check_finalization ( & harness, num_blocks_produced) ;
249
249
check_split_slot ( & harness, store) ;
250
250
check_chain_dump ( & harness, num_blocks_produced + 1 ) ;
@@ -3508,7 +3508,10 @@ fn check_finalization(harness: &TestHarness, expected_slot: u64) {
3508
3508
}
3509
3509
3510
3510
/// Check that the HotColdDB's split_slot is equal to the start slot of the last finalized epoch.
3511
- fn check_split_slot ( harness : & TestHarness , store : Arc < HotColdDB < E , LevelDB < E > , LevelDB < E > > > ) {
3511
+ fn check_split_slot (
3512
+ harness : & TestHarness ,
3513
+ store : Arc < HotColdDB < E , BeaconNodeBackend < E > , BeaconNodeBackend < E > > > ,
3514
+ ) {
3512
3515
let split_slot = store. get_split_slot ( ) ;
3513
3516
assert_eq ! (
3514
3517
harness
0 commit comments