From dd27ef17d584d607e0972ac7cd12c734ebf1462d Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Thu, 23 May 2024 23:31:18 -0500 Subject: [PATCH] Allow 0x prefix for allowed-wasm-module-roots flag --- cmd/nitro/nitro.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/nitro/nitro.go b/cmd/nitro/nitro.go index 26aedfbfb7..427974b34f 100644 --- a/cmd/nitro/nitro.go +++ b/cmd/nitro/nitro.go @@ -453,7 +453,7 @@ func mainImpl() int { if len(allowedWasmModuleRoots) > 0 { moduleRootMatched := false for _, root := range allowedWasmModuleRoots { - bytes, err := hex.DecodeString(root) + bytes, err := hex.DecodeString(strings.TrimPrefix(root, "0x")) if err == nil { if common.HexToHash(root) == common.BytesToHash(bytes) { moduleRootMatched = true