autopilot: update the Node interface to return a raw bytes, not the key
In this commit, we modify the Node interface to return a set of raw bytes, rather than the full pubkey struct. We do this as within the package, commonly we only require the pubkey bytes for fingerprinting purposes. Before this commit, we were forced to _always_ decompress the pubkey which can be expensive done thousands of times a second.
This commit is contained in:
4 files changed
+37
-16
No files matched your search
@@ -17,8 +17,8 @@ import (
|
||||
type Node interface {
|
||||
// PubKey is the identity public key of the node. This will be used to
|
||||
// attempt to target a node for channel opening by the main autopilot
|
||||
// agent.
|
||||
PubKey() *btcec.PublicKey
|
||||
// agent. The key will be returned in serialized compressed format.
|
||||
PubKey() [33]byte
|
||||
|
||||
// Addrs returns a slice of publicly reachable public TCP addresses
|
||||
// that the peer is known to be listening on.
|
||||
|
||||
Reference in new issue
Block a user