reuse hash source function
This commit is contained in:
parent
a6b8b326f1
commit
c4508480c1
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user