diff --git a/channeldb/codec.go b/channeldb/codec.go index e9afe0e1..50887933 100644 --- a/channeldb/codec.go +++ b/channeldb/codec.go @@ -108,7 +108,7 @@ func WriteElement(w io.Writer, element interface{}) error { return err } - case uint64: + case int64, uint64: if err := binary.Write(w, byteOrder, e); err != nil { return err } @@ -280,7 +280,7 @@ func ReadElement(r io.Reader, element interface{}) error { return err } - case *uint64: + case *int64, *uint64: if err := binary.Read(r, byteOrder, e); err != nil { return err }