@@ -136,15 +136,15 @@ object Channel {
136136 * that we are using an outdated commitment.
137137 * This may be the best choice for smaller loosely administered nodes.
138138 */
139- case object AlwaysRequestRemoteClose extends OutdatedCommitmentStrategy
139+ case object RemoteClose extends OutdatedCommitmentStrategy
140140 /**
141141 * If the node was just restarted, just log an error and stop the app. The goal is to prevent unwanted mass
142142 * force-close of channels if we accidentally restarted the node with an outdated backup. After a few minutes, we
143143 * revert to the default behavior of requesting our peer to force close, otherwise this opens a huge attack vector
144144 * where any peer can remotely stop our node.
145145 * This strategy may be better suited for larger nodes, closely administered.
146146 */
147- case object HaltIfJustRestarted extends OutdatedCommitmentStrategy
147+ case object Stop extends OutdatedCommitmentStrategy
148148 }
149149 // @formatter:on
150150
@@ -153,9 +153,9 @@ object Channel {
153153 sealed trait UnhandledExceptionStrategy
154154 object UnhandledExceptionStrategy {
155155 /** 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
157157 /** 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
159159 }
160160 // @formatter:on
161161
@@ -2196,9 +2196,9 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId
21962196 case _ =>
21972197 // unhandled exception: we apply the configured strategy
21982198 nodeParams.unhandledExceptionStrategy match {
2199- case UnhandledExceptionStrategy .LocalForceClose =>
2199+ case UnhandledExceptionStrategy .LocalClose =>
22002200 spendLocalCurrent(dd) sending error
2201- case UnhandledExceptionStrategy .LogAndStop =>
2201+ case UnhandledExceptionStrategy .Stop =>
22022202 log.error(" stopping the node (unhandled exception" )
22032203 System .exit(1 )
22042204 stop(FSM .Shutdown )
@@ -2446,11 +2446,11 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId
24462446
24472447 private def handleOutdatedCommitment (channelReestablish : ChannelReestablish , d : HasCommitments ) = {
24482448 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 =>
24502450 log.error(" we just restarted and may have an outdated commitment! stopping the node" )
24512451 System .exit(1 )
24522452 stop(FSM .Shutdown )
2453- case OutdatedCommitmentStrategy .AlwaysRequestRemoteClose =>
2453+ case OutdatedCommitmentStrategy .RemoteClose =>
24542454 val exc = PleasePublishYourCommitment (d.channelId)
24552455 val error = Error (d.channelId, exc.getMessage)
24562456 goto(WAIT_FOR_REMOTE_PUBLISH_FUTURE_COMMITMENT ) using DATA_WAIT_FOR_REMOTE_PUBLISH_FUTURE_COMMITMENT (d.commitments, channelReestablish) storing() sending error
0 commit comments