Double hashing on terra
Change-Id: Ie3d65030d221585245d94d7650694fc545e72174
This commit is contained in:
parent
aa417344c1
commit
1fc6842917
|
@ -114,6 +114,11 @@ impl ParsedVAA {
|
|||
hasher.update(body);
|
||||
let hash = hasher.finalize().to_vec();
|
||||
|
||||
// Rehash the hash
|
||||
let mut hasher = Keccak256::new();
|
||||
hasher.update(hash);
|
||||
let hash = hasher.finalize().to_vec();
|
||||
|
||||
// Signatures valid, apply VAA
|
||||
if body_offset + Self::VAA_PAYLOAD_POS > data.len() {
|
||||
return ContractError::InvalidVAA.std_err();
|
||||
|
|
Loading…
Reference in New Issue