Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/integration_tests_migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ macro_rules! with_opened_store {
async fn build_migration_node(
instance: &BackendInstance, node_config: ldk_node::config::Config, node_entropy: NodeEntropy,
esplora_url: &str,
) -> ldk_node::Node {
) -> common::TestNode {
let mut builder = Builder::from_config(node_config);
builder.set_chain_source_esplora(esplora_url.to_string(), None);
with_opened_store!(instance, |store| builder.build_with_store(node_entropy, store).unwrap())
with_opened_store!(instance, |store| builder
.build_with_store(node_entropy.into(), store)
.unwrap())
}

fn open_fs_store(data_dir: &str) -> FilesystemStoreV2 {
Expand Down
11 changes: 7 additions & 4 deletions tests/integration_tests_postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn channel_full_cycle_with_postgres_store() {
builder_a.set_chain_source_esplora(esplora_url.clone(), None);
let node_a = builder_a
.build_with_postgres_store(
config_a.node_entropy,
config_a.node_entropy.into(),
test_connection_string(),
None,
Some("channel_cycle_a".to_string()),
Expand All @@ -43,7 +43,7 @@ async fn channel_full_cycle_with_postgres_store() {
builder_b.set_chain_source_esplora(esplora_url.clone(), None);
let node_b = builder_b
.build_with_postgres_store(
config_b.node_entropy,
config_b.node_entropy.into(),
test_connection_string(),
None,
Some("channel_cycle_b".to_string()),
Expand Down Expand Up @@ -79,6 +79,9 @@ async fn postgres_node_restart() {
let storage_path = common::random_storage_path().to_str().unwrap().to_owned();
let mut seed_bytes = [42u8; 64];
rand::rng().fill_bytes(&mut seed_bytes);
#[cfg(feature = "uniffi")]
let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes.to_vec()).unwrap();
#[cfg(not(feature = "uniffi"))]
let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes);

// Setup initial node and fund it.
Expand All @@ -89,7 +92,7 @@ async fn postgres_node_restart() {
builder.set_chain_source_esplora(esplora_url.clone(), None);
let node = builder
.build_with_postgres_store(
node_entropy,
node_entropy.into(),
connection_string.clone(),
None,
Some("restart_test".to_string()),
Expand Down Expand Up @@ -124,7 +127,7 @@ async fn postgres_node_restart() {

let node = builder
.build_with_postgres_store(
node_entropy,
node_entropy.into(),
connection_string.clone(),
None,
Some("restart_test".to_string()),
Expand Down
Loading