aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/node.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/discover/node.go')
-rw-r--r--p2p/discover/node.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/p2p/discover/node.go b/p2p/discover/node.go
index a49a2f547..c6d2e9766 100644
--- a/p2p/discover/node.go
+++ b/p2p/discover/node.go
@@ -18,6 +18,8 @@ import (
"github.com/ethereum/go-ethereum/rlp"
)
+const nodeIDBits = 512
+
// Node represents a host on the network.
type Node struct {
ID NodeID
@@ -135,7 +137,7 @@ func (n *Node) DecodeRLP(s *rlp.Stream) (err error) {
// NodeID is a unique identifier for each node.
// The node identifier is a marshaled elliptic curve public key.
-type NodeID [512 / 8]byte
+type NodeID [nodeIDBits / 8]byte
// NodeID prints as a long hexadecimal number.
func (n NodeID) String() string {