@@ -136,15 +136,15 @@ object Channel {
136
136
* that we are using an outdated commitment.
137
137
* This may be the best choice for smaller loosely administered nodes.
138
138
*/
139
- case object AlwaysRequestRemoteClose extends OutdatedCommitmentStrategy
139
+ case object RemoteClose extends OutdatedCommitmentStrategy
140
140
/**
141
141
* If the node was just restarted, just log an error and stop the app. The goal is to prevent unwanted mass
142
142
* force-close of channels if we accidentally restarted the node with an outdated backup. After a few minutes, we
143
143
* revert to the default behavior of requesting our peer to force close, otherwise this opens a huge attack vector
144
144
* where any peer can remotely stop our node.
145
145
* This strategy may be better suited for larger nodes, closely administered.
146
146
*/
147
- case object HaltIfJustRestarted extends OutdatedCommitmentStrategy
147
+ case object Stop extends OutdatedCommitmentStrategy
148
148
}
149
149
// @formatter:on
150
150
@@ -153,9 +153,9 @@ object Channel {
153
153
sealed trait UnhandledExceptionStrategy
154
154
object UnhandledExceptionStrategy {
155
155
/** Ask our counterparty to close the channel. This may be the best choice for smaller loosely administered nodes.*/
156
- case object LocalForceClose extends UnhandledExceptionStrategy
156
+ case object LocalClose extends UnhandledExceptionStrategy
157
157
/** Just log an error and stop the node. May be better for larger nodes, to prevent unwanted mass force-close.*/
158
- case object LogAndStop extends UnhandledExceptionStrategy
158
+ case object Stop extends UnhandledExceptionStrategy
159
159
}
160
160
// @formatter:on
161
161
@@ -2196,9 +2196,9 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId
2196
2196
case _ =>
2197
2197
// unhandled exception: we apply the configured strategy
2198
2198
nodeParams.unhandledExceptionStrategy match {
2199
- case UnhandledExceptionStrategy .LocalForceClose =>
2199
+ case UnhandledExceptionStrategy .LocalClose =>
2200
2200
spendLocalCurrent(dd) sending error
2201
- case UnhandledExceptionStrategy .LogAndStop =>
2201
+ case UnhandledExceptionStrategy .Stop =>
2202
2202
log.error(" stopping the node (unhandled exception" )
2203
2203
System .exit(1 )
2204
2204
stop(FSM .Shutdown )
@@ -2446,11 +2446,11 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId
2446
2446
2447
2447
private def handleOutdatedCommitment (channelReestablish : ChannelReestablish , d : HasCommitments ) = {
2448
2448
nodeParams.outdatedCommitmentStrategy match {
2449
- case OutdatedCommitmentStrategy .HaltIfJustRestarted if ManagementFactory .getRuntimeMXBean.getUptime.millis < 10 .minutes =>
2449
+ case OutdatedCommitmentStrategy .Stop if ManagementFactory .getRuntimeMXBean.getUptime.millis < 10 .minutes =>
2450
2450
log.error(" we just restarted and may have an outdated commitment! stopping the node" )
2451
2451
System .exit(1 )
2452
2452
stop(FSM .Shutdown )
2453
- case OutdatedCommitmentStrategy .AlwaysRequestRemoteClose =>
2453
+ case OutdatedCommitmentStrategy .RemoteClose =>
2454
2454
val exc = PleasePublishYourCommitment (d.channelId)
2455
2455
val error = Error (d.channelId, exc.getMessage)
2456
2456
goto(WAIT_FOR_REMOTE_PUBLISH_FUTURE_COMMITMENT ) using DATA_WAIT_FOR_REMOTE_PUBLISH_FUTURE_COMMITMENT (d.commitments, channelReestablish) storing() sending error
0 commit comments