mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
multi: add swap label to SwapContract and store under separate key
This commits adds an optional label to our swaps, and writes it to disk under a separate key in our swap bucket. This approach is chosen rather than an on-the-fly addition to our existing swap contract field so that we do not need to deal with EOF checking in the future. To allow creation of unique internal labels, we add a reserved prefix which can be used by the daemon to set labels that are distinct from client set ones.
This commit is contained in:
parent
e2c54bd052
commit
9678c7817d
9 changed files with 223 additions and 21 deletions
|
|
@ -74,6 +74,9 @@ type OutRequest struct {
|
|||
|
||||
// Expiry is the absolute expiry height of the on-chain htlc.
|
||||
Expiry int32
|
||||
|
||||
// Label contains an optional label for the swap.
|
||||
Label string
|
||||
}
|
||||
|
||||
// Out contains the full details of a loop out request. This includes things
|
||||
|
|
@ -186,6 +189,9 @@ type LoopInRequest struct {
|
|||
// ExternalHtlc specifies whether the htlc is published by an external
|
||||
// source.
|
||||
ExternalHtlc bool
|
||||
|
||||
// Label contains an optional label for the swap.
|
||||
Label string
|
||||
}
|
||||
|
||||
// LoopInTerms are the server terms on which it executes loop in swaps.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue