mirror of https://github.com/BTCPrivate/lnd.git
lnwallet: add a String() method to updateType
This commit is contained in:
parent
628c5cd63a
commit
5ece7fec2d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue