Move all attestaion fns into same file
This commit is contained in:
parent
b9dc8437c9
commit
05b890860a
@ -5,8 +5,6 @@ use rand::RngCore;
|
|||||||
use serde_derive::Serialize;
|
use serde_derive::Serialize;
|
||||||
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
|
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
|
||||||
|
|
||||||
mod signing;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||||
pub struct Attestation {
|
pub struct Attestation {
|
||||||
pub data: AttestationData,
|
pub data: AttestationData,
|
||||||
@ -19,6 +17,10 @@ impl Attestation {
|
|||||||
pub fn canonical_root(&self) -> Hash256 {
|
pub fn canonical_root(&self) -> Hash256 {
|
||||||
Hash256::from(&self.hash_tree_root()[..])
|
Hash256::from(&self.hash_tree_root()[..])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn signable_message(&self, custody_bit: bool) -> Vec<u8> {
|
||||||
|
self.data.signable_message(custody_bit)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Encodable for Attestation {
|
impl Encodable for Attestation {
|
@ -1,7 +0,0 @@
|
|||||||
use crate::Attestation;
|
|
||||||
|
|
||||||
impl Attestation {
|
|
||||||
pub fn signable_message(&self, custody_bit: bool) -> Vec<u8> {
|
|
||||||
self.data.signable_message(custody_bit)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user