Skip to content

Commit

Permalink
style(common): adjustement following PR reviews
Browse files Browse the repository at this point in the history
* Moved a "function enter" log as close to the function start as
  possible.
  • Loading branch information
Alenar committed Oct 15, 2024
1 parent b922244 commit 57a317d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mithril-common/src/digesters/cardano_immutable_digester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ impl ImmutableDigester for CardanoImmutableDigester {
.into_iter()
.filter(|f| f.number <= up_to_file_number)
.collect::<Vec<_>>();
info!(self.logger, ">> compute_digest"; "beacon" => #?beacon, "nb_of_immutables" => immutables.len());

match immutables.last() {
None => Err(ImmutableDigesterError::NotEnoughImmutable {
Expand All @@ -65,8 +66,6 @@ impl ImmutableDigester for CardanoImmutableDigester {
})
}
Some(_) => {
info!(self.logger, ">> compute_digest"; "beacon" => #?beacon, "nb_of_immutables" => immutables.len());

let cached_values = match self.cache_provider.as_ref() {
None => BTreeMap::from_iter(immutables.into_iter().map(|i| (i, None))),
Some(cache_provider) => match cache_provider.get(immutables.clone()).await {
Expand Down

0 comments on commit 57a317d

Please sign in to comment.