Move all attestaion fns into same file

This commit is contained in:
Paul Hauner 2019-02-05 12:35:24 +11:00
parent b9dc8437c9
commit 05b890860a
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
2 changed files with 4 additions and 9 deletions

View File

@ -5,8 +5,6 @@ use rand::RngCore;
use serde_derive::Serialize;
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
mod signing;
#[derive(Debug, Clone, PartialEq, Serialize)]
pub struct Attestation {
pub data: AttestationData,
@ -19,6 +17,10 @@ impl Attestation {
pub fn canonical_root(&self) -> Hash256 {
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 {

View File

@ -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)
}
}