diff --git a/path.go b/path.go index 338ac68..3e5219b 100644 --- a/path.go +++ b/path.go @@ -18,9 +18,6 @@ func ParseBlockID(id string) []byte { if len(part) != 1 { return nil } - if _, ok := slotRegistry[part[0]]; !ok { - return nil - } slots = append(slots, part[0]) } else { if part == "" { diff --git a/path_test.go b/path_test.go index e80df1e..d545b28 100644 --- a/path_test.go +++ b/path_test.go @@ -178,12 +178,12 @@ func TestParseBlockID(t *testing.T) { {"C-0-C-1", []byte{'C', 'C'}}, {"H-0", []byte{'H'}}, {"C-0-C-0-C-0", []byte{'C', 'C', 'C'}}, + {"X-0", []byte{'X'}}, + {"H-0-X-0", []byte{'H', 'X'}}, {"", nil}, {"L-1-C-0", []byte{'L', 'C'}}, {"L-0-C", nil}, {"LL-0", nil}, - {"X-0", nil}, - {"H-0-X-0", nil}, } for _, tt := range tests {