Skip to content

Commit 97b1525

Browse files
authored
Use testnet4 for electrum tests instead of testnet3 (#733)
Use testnet4 for electrum tests instead of testnet3
1 parent f94cbac commit 97b1525

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/core/src/commonTest/kotlin/fr/acinq/lightning/blockchain/electrum/ElectrumUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import fr.acinq.lightning.tests.utils.testLoggerFactory
55
import fr.acinq.lightning.utils.ServerAddress
66
import kotlinx.coroutines.CoroutineScope
77

8-
val ElectrumTestnetServerAddress = ServerAddress("testnet1.electrum.acinq.co", 51002, TcpSocket.TLS.UNSAFE_CERTIFICATES)
8+
val ElectrumTestnet4ServerAddress = ServerAddress("mempool.space", 40002, TcpSocket.TLS.UNSAFE_CERTIFICATES)
99
val ElectrumMainnetServerAddress = ServerAddress("electrum.acinq.co", 50002, TcpSocket.TLS.UNSAFE_CERTIFICATES)
1010

1111
suspend fun connectToElectrumServer(scope: CoroutineScope, addr: ServerAddress): ElectrumClient =
1212
ElectrumClient(scope, testLoggerFactory).apply { connect(addr, TcpSocket.Builder()) }
1313

14-
suspend fun CoroutineScope.connectToTestnetServer(): ElectrumClient = connectToElectrumServer(this, ElectrumTestnetServerAddress)
14+
suspend fun CoroutineScope.connectToTestnet4Server(): ElectrumClient = connectToElectrumServer(this, ElectrumTestnet4ServerAddress)
1515

1616
suspend fun CoroutineScope.connectToMainnetServer(): ElectrumClient = connectToElectrumServer(this, ElectrumMainnetServerAddress)

modules/core/src/commonTest/kotlin/fr/acinq/lightning/blockchain/electrum/SwapInWalletTestsCommon.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class SwapInWalletTestsCommon : LightningTestSuite() {
1818
@Test
1919
fun `swap-in wallet test`() = runSuspendTest(timeout = 15.seconds) {
2020
val mnemonics = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about".split(" ")
21-
val keyManager = LocalKeyManager(MnemonicCode.toSeed(mnemonics, "").toByteVector(), Chain.Testnet3, TestConstants.aliceSwapInServerXpub)
22-
val client = connectToTestnetServer()
23-
val wallet = SwapInWallet(Chain.Testnet3, keyManager.swapInOnChainWallet, client, this, loggerFactory)
21+
val keyManager = LocalKeyManager(MnemonicCode.toSeed(mnemonics, "").toByteVector(), Chain.Testnet4, TestConstants.aliceSwapInServerXpub)
22+
val client = connectToTestnet4Server()
23+
val wallet = SwapInWallet(Chain.Testnet4, keyManager.swapInOnChainWallet, client, this, loggerFactory)
2424

2525
// addresses 0 to 3 have funds on them, the current address is the 4th
2626
assertEquals(4, wallet.swapInAddressFlow.filterNotNull().first().second)

0 commit comments

Comments
 (0)