mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
channeldb+lnwallet: add ShutdownInfo with read and write methods
ShutdownInfo contains any info about a previous Shutdown message that we have sent. This commit adds this type along with read and write methods for it in the channel db. The existence of the ShutdownInfo on disk represents the fact that we have previously sent the Shutdown message and hence that we should resend it on re-establish.
This commit is contained in:
@@ -35,6 +35,11 @@ type Channel interface { //nolint:interfacebloat
|
||||
// transaction has been broadcast.
|
||||
MarkCoopBroadcasted(*wire.MsgTx, bool) error
|
||||
|
||||
// MarkShutdownSent persists the given ShutdownInfo. The existence of
|
||||
// the ShutdownInfo represents the fact that the Shutdown message has
|
||||
// been sent by us and so should be re-sent on re-establish.
|
||||
MarkShutdownSent(info *channeldb.ShutdownInfo) error
|
||||
|
||||
// IsInitiator returns true we are the initiator of the channel.
|
||||
IsInitiator() bool
|
||||
|
||||
|
Reference in New Issue
Block a user