aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/enode/node.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/enode/node.go')
-rw-r--r--p2p/enode/node.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/p2p/enode/node.go b/p2p/enode/node.go
index 84088fcd2..b454ab255 100644
--- a/p2p/enode/node.go
+++ b/p2p/enode/node.go
@@ -98,6 +98,13 @@ func (n *Node) Pubkey() *ecdsa.PublicKey {
return &key
}
+// Record returns the node's record. The return value is a copy and may
+// be modified by the caller.
+func (n *Node) Record() *enr.Record {
+ cpy := n.r
+ return &cpy
+}
+
// checks whether n is a valid complete node.
func (n *Node) ValidateComplete() error {
if n.Incomplete() {