Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
4636: Return None in case of an error in get_addressable_entity r=jacek-casper a=jacek-casper

The current behaviour causes a problem in NCTL upgrade scenario 11, where we use `get_total_supply_key` from the state upgrade script. The `get_addressable_entity` function fails instead of returning None, while `get_total_supply_key` expects it to return None in order to handle the legacy format. The error type here has already been converted to a String, so we can't match precisely on the NotFound error.

Co-authored-by: Jacek Malec <[email protected]>
  • Loading branch information
casperlabs-bors-ng[bot] and jacek-casper authored Apr 2, 2024
2 parents a9afd2e + bdab634 commit c4e0a96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ where
Key::addressable_entity_key(EntityKindTag::System, entity_hash),
&[],
)
.expect("must have value"),
.ok()?,
};

if let StoredValue::AddressableEntity(entity) = value {
Expand Down

0 comments on commit c4e0a96

Please sign in to comment.