Skip to content

Commit cd3f213

Browse files
committed
Remove unused struct
1 parent 17eb283 commit cd3f213

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/observation.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::io::Write;
22
use serde::{Deserialize, Serialize};
33
use sha3::Digest as Sha3Digest;
4-
use secp256k1::{Secp256k1, SecretKey, Message, ecdsa::RecoverableSignature};
4+
use secp256k1::{Secp256k1, SecretKey, Message};
55

66
/// The body for a VAA.
77
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -17,22 +17,6 @@ pub struct Body {
1717
pub payload: Vec<u8>,
1818
}
1919

20-
/// Digest data for the Body.
21-
#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
22-
pub struct Digest {
23-
/// Guardians don't hash the VAA body directly, instead they hash the VAA and sign the hash. The
24-
/// purpose of this is it means when submitting a VAA on-chain we only have to submit the hash
25-
/// which reduces gas costs.
26-
pub hash: [u8; 32],
27-
28-
/// The secp256k_hash is the hash of the hash of the VAA. The reason we provide this is because
29-
/// of how secp256k works internally. It hashes its payload before signing. This means that
30-
/// when verifying secp256k signatures, we're actually checking if a guardian has signed the
31-
/// hash of the hash of the VAA. Functions such as `ecrecover` expect the secp256k hash rather
32-
/// than the original payload.
33-
pub secp256k_hash: [u8; 32],
34-
}
35-
3620
#[derive(Debug)]
3721
pub enum Error {
3822
#[allow(dead_code)]

0 commit comments

Comments
 (0)