mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 14:44:22 +01:00
lnwallet: add a String() method to updateType
This commit is contained in:
@@ -114,6 +114,21 @@ const (
|
|||||||
Settle
|
Settle
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// String returns a human readable string that uniquely identifies the target
|
||||||
|
// update type.
|
||||||
|
func (u updateType) String() string {
|
||||||
|
switch u {
|
||||||
|
case Add:
|
||||||
|
return "Add"
|
||||||
|
case Fail:
|
||||||
|
return "Fail"
|
||||||
|
case Settle:
|
||||||
|
return "Settle"
|
||||||
|
default:
|
||||||
|
return "<unknown type>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// PaymentDescriptor represents a commitment state update which either adds,
|
// PaymentDescriptor represents a commitment state update which either adds,
|
||||||
// settles, or removes an HTLC. PaymentDescriptors encapsulate all necessary
|
// settles, or removes an HTLC. PaymentDescriptors encapsulate all necessary
|
||||||
// metadata w.r.t to an HTLC, and additional data pairing a settle message to
|
// metadata w.r.t to an HTLC, and additional data pairing a settle message to
|
||||||
|
|||||||
Reference in New Issue
Block a user