@@ -19,7 +19,6 @@ package fr.acinq.eclair
19
19
import com .typesafe .config .{Config , ConfigFactory , ConfigValueType }
20
20
import fr .acinq .bitcoin .Crypto .PublicKey
21
21
import fr .acinq .bitcoin .{Block , ByteVector32 , Crypto , Satoshi }
22
- import fr .acinq .eclair .NodeParams .WatcherType
23
22
import fr .acinq .eclair .Setup .Seeds
24
23
import fr .acinq .eclair .blockchain .fee ._
25
24
import fr .acinq .eclair .channel .Channel
@@ -79,7 +78,6 @@ case class NodeParams(nodeKeyManager: NodeKeyManager,
79
78
maxReconnectInterval : FiniteDuration ,
80
79
chainHash : ByteVector32 ,
81
80
channelFlags : Byte ,
82
- watcherType : WatcherType ,
83
81
watchSpentWindow : FiniteDuration ,
84
82
paymentRequestExpiry : FiniteDuration ,
85
83
multiPartPaymentExpiry : FiniteDuration ,
@@ -110,11 +108,10 @@ case class NodeParams(nodeKeyManager: NodeKeyManager,
110
108
111
109
object NodeParams extends Logging {
112
110
111
+ // @formatter:off
113
112
sealed trait WatcherType
114
-
115
113
object BITCOIND extends WatcherType
116
-
117
- object ELECTRUM extends WatcherType
114
+ // @formatter:on
118
115
119
116
/**
120
117
* Order of precedence for the configuration parameters:
@@ -123,7 +120,7 @@ object NodeParams extends Logging {
123
120
* 3) Optionally provided config
124
121
* 4) Default values in reference.conf
125
122
*/
126
- def loadConfiguration (datadir : File ) =
123
+ def loadConfiguration (datadir : File ): Config =
127
124
ConfigFactory .parseProperties(System .getProperties)
128
125
.withFallback(ConfigFactory .parseFile(new File (datadir, " eclair.conf" )))
129
126
.withFallback(ConfigFactory .load())
@@ -214,11 +211,6 @@ object NodeParams extends Logging {
214
211
val color = ByteVector .fromValidHex(config.getString(" node-color" ))
215
212
require(color.size == 3 , " color should be a 3-bytes hex buffer" )
216
213
217
- val watcherType = config.getString(" watcher-type" ) match {
218
- case " electrum" => ELECTRUM
219
- case _ => BITCOIND
220
- }
221
-
222
214
val watchSpentWindow = FiniteDuration (config.getDuration(" watch-spent-window" ).getSeconds, TimeUnit .SECONDS )
223
215
require(watchSpentWindow > 0 .seconds, " watch-spent-window must be strictly greater than 0" )
224
216
@@ -364,7 +356,6 @@ object NodeParams extends Logging {
364
356
maxReconnectInterval = FiniteDuration (config.getDuration(" max-reconnect-interval" ).getSeconds, TimeUnit .SECONDS ),
365
357
chainHash = chainHash,
366
358
channelFlags = config.getInt(" channel-flags" ).toByte,
367
- watcherType = watcherType,
368
359
watchSpentWindow = watchSpentWindow,
369
360
paymentRequestExpiry = FiniteDuration (config.getDuration(" payment-request-expiry" ).getSeconds, TimeUnit .SECONDS ),
370
361
multiPartPaymentExpiry = FiniteDuration (config.getDuration(" multi-part-payment-expiry" ).getSeconds, TimeUnit .SECONDS ),
0 commit comments