reuse hash source function

This commit is contained in:
Quaternions 2024-12-26 19:59:27 -08:00
parent a6b8b326f1
commit c4508480c1

View File

@ -139,9 +139,7 @@ async fn review(config:ReviewConfig)->Result<(),ReviewError>{
submissions_api::types::Policy::Allowed
}else{
// compute hash
let mut hasher=siphasher::sip::SipHasher::new();
std::hash::Hasher::write(&mut hasher,source.as_bytes());
let hash=std::hash::Hasher::finish(&hasher);
let hash=hash_source(source.as_str());
// check if modified script already exists
let maybe_script_response=api.get_script_from_hash(submissions_api::types::HashRequest{