lnwire: use color.RGBA instead of custom type in NodeAnnouncment

This commit is contained in:
Olaoluwa Osuntokun
2017-12-02 18:23:05 -08:00
parent 724adb158c
commit 4b6ada98d6
3 changed files with 14 additions and 19 deletions

View File

@@ -3,6 +3,7 @@ package lnwire
import (
"bytes"
"fmt"
"image/color"
"io"
"net"
"unicode/utf8"
@@ -15,14 +16,6 @@ var (
endPort uint16 = 49151
)
// RGB is used to represent the "color" of a particular node encoded as a 24
// bit value.
type RGB struct {
red uint8
green uint8
blue uint8
}
// NodeAlias a hex encoded UTF-8 string that may be displayed as an alternative
// to the node's ID. Notice that aliases are not unique and may be freely
// chosen by the node operators.
@@ -69,7 +62,7 @@ type NodeAnnouncement struct {
// RGBColor is used to customize their node's appearance in maps and
// graphs
RGBColor RGB
RGBColor color.RGBA
// Alias is used to customize their node's appearance in maps and
// graphs