From 3e6d7c169b23b3aa95fe0e2f1cbfb3501015af57 Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Fri, 27 Oct 2017 09:40:52 +0100 Subject: [PATCH] cmd/rlpdump: allow hex input to have leading '0x' --- cmd/rlpdump/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 7d328e59b3..d0f993c5b8 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -51,7 +51,7 @@ func main() { var r io.Reader switch { case *hexMode != "": - data, err := hex.DecodeString(*hexMode) + data, err := hex.DecodeString(strings.TrimPrefix(*hexMode, "0x")) if err != nil { die(err) }