lnwallet: add a String() method to updateType

This commit is contained in:
Olaoluwa Osuntokun 2017-07-31 20:37:44 -07:00
parent 628c5cd63a
commit 5ece7fec2d
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -114,6 +114,21 @@ const (
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,
// settles, or removes an HTLC. PaymentDescriptors encapsulate all necessary
// metadata w.r.t to an HTLC, and additional data pairing a settle message to