lnwire: replace instances of *btcec.PublicKey with [33]byte in ann messages

In this commit, we replace all instances of *btcec.PublicKey within the
announcement messages with a simple [33]byte. We do this as usually we
don’t need to immediately validate an announcement, therefore we can
avoid the scalar multiplications during decoding.
This commit is contained in:
Olaoluwa Osuntokun committed 2018-02-06 20:14:30 -08:00
1 parent 4dd108c827
commit aa2e91f7c4
4 files changed
+113 -31

No files matched your search

+1 -3
View File
@@ -7,8 +7,6 @@ import (
"io"
"net"
"unicode/utf8"
"github.com/roasbeef/btcd/btcec"
)
var (
@@ -59,7 +57,7 @@ type NodeAnnouncement struct {
Timestamp uint32
// NodeID is a public key which is used as node identification.
NodeID *btcec.PublicKey
NodeID [33]byte
// RGBColor is used to customize their node's appearance in maps and
// graphs