diff --git a/channeldb/payments.go b/channeldb/payments.go index c3c09326..a03c9e0c 100644 --- a/channeldb/payments.go +++ b/channeldb/payments.go @@ -3,7 +3,6 @@ package channeldb import ( "bytes" "encoding/binary" - "errors" "fmt" "io" "sort" @@ -154,27 +153,6 @@ const ( StatusFailed PaymentStatus = 3 ) -// Bytes returns status as slice of bytes. -func (ps PaymentStatus) Bytes() []byte { - return []byte{byte(ps)} -} - -// FromBytes sets status from slice of bytes. -func (ps *PaymentStatus) FromBytes(status []byte) error { - if len(status) != 1 { - return errors.New("payment status is empty") - } - - switch PaymentStatus(status[0]) { - case StatusUnknown, StatusInFlight, StatusSucceeded, StatusFailed: - *ps = PaymentStatus(status[0]) - default: - return errors.New("unknown payment status") - } - - return nil -} - // String returns readable representation of payment status. func (ps PaymentStatus) String() string { switch ps {