Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Electrum support #1750

Merged
merged 4 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1,230 changes: 0 additions & 1,230 deletions eclair-core/src/main/resources/electrum/checkpoints_mainnet.json

This file was deleted.

3,306 changes: 0 additions & 3,306 deletions eclair-core/src/main/resources/electrum/checkpoints_testnet.json

This file was deleted.

108 changes: 0 additions & 108 deletions eclair-core/src/main/resources/electrum/servers_mainnet.json

This file was deleted.

10 changes: 0 additions & 10 deletions eclair-core/src/main/resources/electrum/servers_regtest.json

This file was deleted.

38 changes: 0 additions & 38 deletions eclair-core/src/main/resources/electrum/servers_testnet.json

This file was deleted.

3 changes: 1 addition & 2 deletions eclair-core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ eclair {
// override this with a script/exe that will be called everytime a new database backup has been created
# backup-notify-script = "/absolute/path/to/script.sh"

watcher-type = "bitcoind" // other *experimental* values include "electrum"
watcher-type = "bitcoind"
pm47 marked this conversation as resolved.
Show resolved Hide resolved
watch-spent-window = 1 minute // at startup watches will be put back within that window to reduce herd effect; must be > 0s

bitcoind {
Expand Down Expand Up @@ -91,7 +91,6 @@ eclair {
on-chain-fees {
min-feerate = 1 // minimum feerate in satoshis per byte
smoothing-window = 6 // 1 = no smoothing
provider-timeout = 5 seconds // max time we'll wait for answers from a fee provider before we fallback to the next one

default-feerates { // those are per target block, in satoshis per kilobyte
1 = 210000
Expand Down
13 changes: 5 additions & 8 deletions eclair-core/src/main/scala/fr/acinq/eclair/NodeParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,10 @@ case class NodeParams(nodeKeyManager: NodeKeyManager,

object NodeParams extends Logging {

// @formatter:off
sealed trait WatcherType

object BITCOIND extends WatcherType

object ELECTRUM extends WatcherType
// @formatter:on

/**
* Order of precedence for the configuration parameters:
Expand All @@ -123,7 +122,7 @@ object NodeParams extends Logging {
* 3) Optionally provided config
* 4) Default values in reference.conf
*/
def loadConfiguration(datadir: File) =
def loadConfiguration(datadir: File): Config =
ConfigFactory.parseProperties(System.getProperties)
.withFallback(ConfigFactory.parseFile(new File(datadir, "eclair.conf")))
.withFallback(ConfigFactory.load())
Expand Down Expand Up @@ -214,10 +213,8 @@ object NodeParams extends Logging {
val color = ByteVector.fromValidHex(config.getString("node-color"))
require(color.size == 3, "color should be a 3-bytes hex buffer")

val watcherType = config.getString("watcher-type") match {
case "electrum" => ELECTRUM
case _ => BITCOIND
}
require(config.getString("watcher-type") == "bitcoind", s"watcher-type `${config.getString("watcher-type")}` is not supported: `bitcoind` should be used")
val watcherType = BITCOIND

val watchSpentWindow = FiniteDuration(config.getDuration("watch-spent-window").getSeconds, TimeUnit.SECONDS)
require(watchSpentWindow > 0.seconds, "watch-spent-window must be strictly greater than 0")
Expand Down
Loading