Skip to content

Commit 20d3e0a

Browse files
authored
cmd/devp2p: fix decoding of raw RLP ENR attributes (ethereum#29257)
1 parent 3c26ffe commit 20d3e0a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/devp2p/enrcmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ var attrFormatters = map[string]func(rlp.RawValue) (string, bool){
183183
}
184184

185185
func formatAttrRaw(v rlp.RawValue) (string, bool) {
186-
s := hex.EncodeToString(v)
187-
return s, true
186+
content, _, err := rlp.SplitString(v)
187+
return hex.EncodeToString(content), err == nil
188188
}
189189

190190
func formatAttrString(v rlp.RawValue) (string, bool) {

0 commit comments

Comments
 (0)