Fixed empty name handling

This commit is contained in:
arkpar 2016-01-14 23:01:41 +01:00
parent 77c5b315df
commit e5a51707ec

View File

@ -198,7 +198,7 @@ impl FromJson for Spec {
Spec {
name: json["name"].as_string().unwrap().to_string(),
name: json.find("name").map(|j| j.as_string().unwrap()).unwrap_or("unknown").to_string(),
engine_name: json["engineName"].as_string().unwrap().to_string(),
engine_params: json_to_rlp_map(&json["params"]),
builtins: builtins,