diff --git a/core/rawdb/accessors_trie.go b/core/rawdb/accessors_trie.go index 0f856d1804..bfe20767d9 100644 --- a/core/rawdb/accessors_trie.go +++ b/core/rawdb/accessors_trie.go @@ -302,6 +302,10 @@ func ParseStateScheme(provided string, disk ethdb.Database) (string, error) { log.Info("State scheme set to already existing", "scheme", stored) return stored, nil // reuse scheme of persistent scheme } + // If state scheme is specified, ensure it's valid. + if provided != HashScheme && provided != PathScheme { + return "", fmt.Errorf("invalid state scheme %s", provided) + } // If state scheme is specified, ensure it's compatible with // persistent state. if stored == "" || provided == stored {