From 539af9cc8f82d0adedf4c03763830a5c624b224d Mon Sep 17 00:00:00 2001 From: x100111010 <167847953+x100111010@users.noreply.github.com> Date: Sun, 18 Aug 2024 20:10:09 +0200 Subject: [PATCH 1/2] fix deprecated `IdbIndexParameters::unique` method warnings --- .../core/src/storage/local/transaction/indexdb.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wallet/core/src/storage/local/transaction/indexdb.rs b/wallet/core/src/storage/local/transaction/indexdb.rs index e4190aa..232db46 100644 --- a/wallet/core/src/storage/local/transaction/indexdb.rs +++ b/wallet/core/src/storage/local/transaction/indexdb.rs @@ -33,20 +33,29 @@ impl Inner { // Check if the object store exists; create it if it doesn't if !evt.db().object_store_names().any(|n| n == TRANSACTIONS_STORE_NAME) { let object_store = evt.db().create_object_store(TRANSACTIONS_STORE_NAME)?; + + let id_index_params = IdbIndexParameters::new(); + id_index_params.set_unique(true); object_store.create_index_with_params( TRANSACTIONS_STORE_ID_INDEX, &IdbKeyPath::str(TRANSACTIONS_STORE_ID_INDEX), - IdbIndexParameters::new().unique(true), + &id_index_params, )?; + + let timestamp_index_params = IdbIndexParameters::new(); + timestamp_index_params.set_unique(false); object_store.create_index_with_params( TRANSACTIONS_STORE_TIMESTAMP_INDEX, &IdbKeyPath::str(TRANSACTIONS_STORE_TIMESTAMP_INDEX), - IdbIndexParameters::new().unique(false), + ×tamp_index_params, )?; + + let data_index_params = IdbIndexParameters::new(); + data_index_params.set_unique(false); object_store.create_index_with_params( TRANSACTIONS_STORE_DATA_INDEX, &IdbKeyPath::str(TRANSACTIONS_STORE_DATA_INDEX), - IdbIndexParameters::new().unique(false), + &data_index_params, )?; } Ok(()) From 87df80ac1062ccded478b848f58eaedbd9a9c7a5 Mon Sep 17 00:00:00 2001 From: 0xA001113 <0xeuler@proton.me> Date: Thu, 17 Oct 2024 10:15:00 +0200 Subject: [PATCH 2/2] TN and TN11 DNS seeders --- consensus/core/src/config/params.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/consensus/core/src/config/params.rs b/consensus/core/src/config/params.rs index 59b04d4..219176e 100644 --- a/consensus/core/src/config/params.rs +++ b/consensus/core/src/config/params.rs @@ -346,7 +346,11 @@ pub const MAINNET_PARAMS: Params = Params { }; pub const TESTNET_PARAMS: Params = Params { - dns_seeders: &[], + dns_seeders: &[ + // Official DNS seeders. + "testnet-dnsseed-1.spectre-network.org", + "testnet-dnsseed-2.spectre-network.org", + ], net: NetworkId::with_suffix(NetworkType::Testnet, 10), genesis: TESTNET_GENESIS, ghostdag_k: LEGACY_DEFAULT_GHOSTDAG_K, @@ -400,7 +404,11 @@ pub const TESTNET_PARAMS: Params = Params { }; pub const TESTNET11_PARAMS: Params = Params { - dns_seeders: &[], + dns_seeders: &[ + // Official DNS seeders. + "testnet11-dnsseed-1.spectre-network.org", + "testnet11-dnsseed-2.spectre-network.org", + ], net: NetworkId::with_suffix(NetworkType::Testnet, 11), genesis: TESTNET11_GENESIS, legacy_timestamp_deviation_tolerance: LEGACY_TIMESTAMP_DEVIATION_TOLERANCE,