lnwire: separate ChannelID into a distinct struct, add tests

This commit separates out the ChannelID into a new file, with
additional helper methods for conversion and formatting. With this
commit, the struct is now more general purpose and can be used in the
new routing package, database, and other related sub-systems.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-12-27 16:43:24 -08:00
1 parent 5ee201e712
commit 3d32c4e90e
6 files changed
+90 -31

No files matched your search

+4 -3
View File
@@ -3,11 +3,12 @@ package lnwire
import (
"bytes"
"fmt"
"io"
"net"
"github.com/go-errors/errors"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcd/wire"
"io"
"net"
)
var (
@@ -72,7 +73,7 @@ type NodeAnnouncement struct {
// the node is accepting incoming connections.
Address *net.TCPAddr
// NodeID is a public key which is used as node identificator.
// NodeID is a public key which is used as node identification.
NodeID *btcec.PublicKey
// RGBColor is used to customize their node's appearance in maps and graphs