mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
channeldb: ensure channel buckets are only created once
In this commit, we ensure that we only create the sub-bucket for channels once: at the time of creation. We do this as otherwise it's possible that a method that mutates a channel's state is called after it has already been closed on-chain, leading to the channel bucket being recreated.
This commit is contained in:
@@ -43,6 +43,10 @@ var (
|
||||
// specific identity can't be found.
|
||||
ErrNodeNotFound = fmt.Errorf("link node with target identity not found")
|
||||
|
||||
// ErrChannelNotFound is returned when we attempt to locate a channel
|
||||
// for a specific chain, but it is not found.
|
||||
ErrChannelNotFound = fmt.Errorf("channel not found")
|
||||
|
||||
// ErrMetaNotFound is returned when meta bucket hasn't been
|
||||
// created.
|
||||
ErrMetaNotFound = fmt.Errorf("unable to locate meta information")
|
||||
|
Reference in New Issue
Block a user