From 9bcf41d40116eac9f65d852c3c1501f3ddd8a5df Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 1 Apr 2020 00:13:24 +0200 Subject: [PATCH] channeldb: make FailureReason Error() --- channeldb/payments.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/channeldb/payments.go b/channeldb/payments.go index a1ea379b..adf5cf8c 100644 --- a/channeldb/payments.go +++ b/channeldb/payments.go @@ -123,7 +123,12 @@ const ( // LocalLiquidityInsufficient, RemoteCapacityInsufficient. ) -// String returns a human readable FailureReason +// Error returns a human readable error string for the FailureReason. +func (r FailureReason) Error() string { + return r.String() +} + +// String returns a human readable FailureReason. func (r FailureReason) String() string { switch r { case FailureReasonTimeout: