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:
4 files changed
+113
-31
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user