commonMain.fr.acinq.lightning.channel.states.Closed.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lightning-kmp-jvm Show documentation
Show all versions of lightning-kmp-jvm Show documentation
A Kotlin Multiplatform implementation of the Lightning Network
package fr.acinq.lightning.channel.states
import fr.acinq.lightning.channel.ChannelAction
import fr.acinq.lightning.channel.ChannelCommand
import fr.acinq.lightning.channel.Commitments
/**
* Channel is closed i.t its funding tx has been spent and the spending transactions have been confirmed, it can be forgotten
*/
data class Closed(val state: Closing) : ChannelStateWithCommitments() {
override val commitments: Commitments get() = state.commitments
override fun updateCommitments(input: Commitments): ChannelStateWithCommitments {
return this.copy(state = state.updateCommitments(input) as Closing)
}
override suspend fun ChannelContext.processInternal(cmd: ChannelCommand): Pair> {
return Pair(this@Closed, listOf())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy