mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
channeldb: re-introduce revocationLogBucket
This commit adds `revocationLogBucket` using the new sub-bucket key "revocation-log" to store the minimal info needed. Two structs, `RevocationLog` and `HTLCEntry` are created to represent the disk records.
This commit is contained in:
@@ -179,10 +179,6 @@ var (
|
||||
// channel.
|
||||
ErrChanBorked = fmt.Errorf("cannot mutate borked channel")
|
||||
|
||||
// ErrLogEntryNotFound is returned when we cannot find a log entry at
|
||||
// the height requested in the revocation log.
|
||||
ErrLogEntryNotFound = fmt.Errorf("log entry not found")
|
||||
|
||||
// ErrMissingIndexEntry is returned when a caller attempts to close a
|
||||
// channel and the outpoint is missing from the index.
|
||||
ErrMissingIndexEntry = fmt.Errorf("missing outpoint from index")
|
||||
@@ -1687,6 +1683,8 @@ func (c *OpenChannel) ActiveHtlcs() []HTLC {
|
||||
//
|
||||
// TODO(roasbeef): save space by using smaller ints at tail end?
|
||||
type HTLC struct {
|
||||
// TODO(yy): can embed an HTLCEntry here.
|
||||
|
||||
// Signature is the signature for the second level covenant transaction
|
||||
// for this HTLC. The second level transaction is a timeout tx in the
|
||||
// case that this is an outgoing HTLC, and a success tx in the case
|
||||
|
Reference in New Issue
Block a user