Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Mar 28, 2024
1 parent 31de956 commit 40ca241
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions arbitrator/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ macro_rules! handle_preimage_resolution {
$hash, err,
),
}
data
Some(data)
}};
}

Expand All @@ -332,11 +332,13 @@ pub unsafe extern "C" fn arbitrator_set_preimage_resolver(
if cache.contains(&hash) {
return cache.get(&hash).cloned();
}
let data = handle_preimage_resolution!(context, ty, hash, resolver);
cache.put(hash, data.clone());
return Some(data);
if let Some(data) = handle_preimage_resolution!(context, ty, hash, resolver) {
cache.put(hash, data.clone());
return Some(data);
}
return None;
}
Some(handle_preimage_resolution!(context, ty, hash, resolver))
handle_preimage_resolution!(context, ty, hash, resolver)
},
) as PreimageResolver);
}
Expand Down

0 comments on commit 40ca241

Please sign in to comment.