github.com/unicornultrafoundation/go-u2u@v1.0.0-rc1.0.20240205080301-e74a83d3fadc/gossip/enr_entry.go (about) 1 package gossip 2 3 import ( 4 "github.com/unicornultrafoundation/go-u2u/core/forkid" 5 "github.com/unicornultrafoundation/go-u2u/rlp" 6 ) 7 8 // Enr is ENR entry which advertises eth protocol 9 // on the discovery network. 10 type Enr struct { 11 ForkID forkid.ID 12 // Ignore additional fields (for forward compatibility). 13 Rest []rlp.RawValue `rlp:"tail"` 14 } 15 16 // ENRKey implements enr.Entry. 17 func (e Enr) ENRKey() string { 18 return "u2u" 19 } 20 21 func (s *Service) currentEnr() *Enr { 22 return &Enr{} 23 }