Skip to content

Commit

Permalink
test: add test for ElectrumClient::server_features method
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Dec 18, 2024
1 parent b8b5a0a commit 02ea965
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.bitcoindevkit

import kotlin.test.Test
import org.rustbitcoin.bitcoin.Network
import org.bitcoindevkit.ServerFeaturesRes

private const val SIGNET_ELECTRUM_URL = "ssl://mempool.space:60602"

Expand Down Expand Up @@ -38,4 +39,16 @@ class LiveElectrumClientTest {
println("Received ${sentAndReceived.received.toSat()}")
}
}
}

@Test
fun testServerFeatures() {
val electrumClient: ElectrumClient = ElectrumClient("ssl://electrum.blockstream.info:60002")
val features: ServerFeaturesRes = electrumClient.serverFeatures()
println("Server Features:\n$features")

assertEquals(
expected = "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
actual = features.genesisHash
)
}
}

0 comments on commit 02ea965

Please sign in to comment.