Skip to content

Commit 3669428

Browse files
authored
Don't log ClosingType object (#1781)
It may contain a lot of data and pollute the logs.
1 parent 62dd393 commit 3669428

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import fr.acinq.eclair.channel.Monitoring.{Metrics, Tags}
3232
import fr.acinq.eclair.channel.TxPublisher.{PublishRawTx, PublishTx, SetChannelId, SignAndPublishTx}
3333
import fr.acinq.eclair.crypto.ShaChain
3434
import fr.acinq.eclair.crypto.keymanager.ChannelKeyManager
35+
import fr.acinq.eclair.db.DbEventHandler.ChannelEvent.EventType
3536
import fr.acinq.eclair.db.PendingRelayDb
3637
import fr.acinq.eclair.db.pg.PgUtils.PgLock.logger
3738
import fr.acinq.eclair.io.Peer
@@ -229,7 +230,7 @@ class Channel(val nodeParams: NodeParams, val wallet: EclairWallet, remoteNodeId
229230
case closing: DATA_CLOSING =>
230231
// we don't put back the WatchSpent if the commitment tx has already been published and the spending tx already reached mindepth
231232
val closingType_opt = Closing.isClosingTypeAlreadyKnown(closing)
232-
log.info(s"channel is closing (closingType=${closingType_opt.getOrElse("UnknownYet")})")
233+
log.info(s"channel is closing (closingType=${closingType_opt.map(c => EventType.Closed(c).label).getOrElse("UnknownYet")})")
233234
// if the closing type is known:
234235
// - there is no need to watch the funding tx because it has already been spent and the spending tx has already reached mindepth
235236
// - there is no need to attempt to publish transactions for other type of closes

0 commit comments

Comments
 (0)