Skip to content

Commit b43e293

Browse files
committed
f: use build()
1 parent 6a259a0 commit b43e293

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

tests/common/mod.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -410,21 +410,14 @@ pub(crate) fn setup_node_for_async_payments(
410410

411411
builder.set_async_payments_role(async_payments_role).unwrap();
412412

413-
let kv_store: Arc<DynStore> = match config.store_type {
413+
let node = match config.store_type {
414414
TestStoreType::TestSyncStore => {
415-
Arc::new(TestSyncStore::new(config.node_config.storage_dir_path.into()))
415+
let kv_store = Arc::new(TestSyncStore::new(config.node_config.storage_dir_path.into()));
416+
builder.build_with_store(kv_store).unwrap()
416417
},
417-
TestStoreType::Sqlite => Arc::new(
418-
SqliteStore::new(
419-
config.node_config.storage_dir_path.into(),
420-
Some(SQLITE_DB_FILE_NAME.to_string()),
421-
Some(KV_TABLE_NAME.to_string()),
422-
)
423-
.unwrap(),
424-
),
418+
TestStoreType::Sqlite => builder.build().unwrap(),
425419
};
426420

427-
let node = builder.build_with_store(kv_store).unwrap();
428421
node.start().unwrap();
429422
assert!(node.status().is_running);
430423
assert!(node.status().latest_fee_rate_cache_update_timestamp.is_some());

0 commit comments

Comments
 (0)