mirror of
https://github.com/ACINQ/eclair.git
synced 2025-03-12 19:01:39 +01:00
Workaround for DATA_CLOSING for custom commit published
This commit is contained in:
parent
0b04706de0
commit
30ea80c560
2 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,8 @@ final case class DATA_CLOSING(commitments: Commitments,
|
|||
futureRemoteCommitPublished: Option[RemoteCommitPublished] = None,
|
||||
revokedCommitPublished: List[RevokedCommitPublished] = Nil) extends Data with HasCommitments {
|
||||
val spendingTxes = mutualClosePublished ::: localCommitPublished.map(_.commitTx).toList ::: remoteCommitPublished.map(_.commitTx).toList ::: nextRemoteCommitPublished.map(_.commitTx).toList ::: customRemoteCommitPublished.values.map(_.commitTx).toList ::: futureRemoteCommitPublished.map(_.commitTx).toList ::: revokedCommitPublished.map(_.commitTx)
|
||||
require(spendingTxes.nonEmpty, "there must be at least one tx published in this state")
|
||||
// workaround because custom commits published are not persisted
|
||||
// require(spendingTxes.nonEmpty, "there must be at least one tx published in this state")
|
||||
}
|
||||
|
||||
final case class DATA_WAIT_FOR_REMOTE_PUBLISH_FUTURE_COMMITMENT(commitments: Commitments, remoteChannelReestablish: ChannelReestablish) extends Data with HasCommitments
|
||||
|
|
|
@ -99,7 +99,6 @@ class SqliteChannelsDb(sqlite: Connection) extends ChannelsDb with Logging {
|
|||
using(sqlite.createStatement) { statement =>
|
||||
val rs = statement.executeQuery("SELECT data FROM local_channels WHERE is_closed=0")
|
||||
codecSequence(rs, stateDataCodec, onError = { message =>
|
||||
logger.error(s"cannot read local channels data: data=${BitVector(rs.getBytes("data")).toHex}")
|
||||
logger.error(message)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue