Derive clone for several struct

This commit is contained in:
Paul Hauner 2018-07-17 17:32:55 +10:00
parent 5b922c7b41
commit e5979ddca3
4 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ use super::rlp::encode as rlp_encode;
use super::blake2::{ Blake2s, Digest };
use super::utils::types::*;
#[derive(Clone)]
pub struct ActiveState {
pub height: u64,
pub randao: Sha256Digest,

View File

@ -6,6 +6,7 @@ use super::rlp::encode as rlp_encode;
use super::ethereum_types::U256;
use super::blake2::{ Blake2s, Digest };
#[derive(Clone)]
pub struct CrystallizedState {
pub active_validators: Vec<ValidatorRecord>,
pub queued_validators: Vec<ValidatorRecord>,

View File

@ -3,7 +3,7 @@ use super::utils::types::{ Sha256Digest, Bitfield };
use super::rlp::{ RlpStream, Encodable };
use super::bytes::{ BytesMut, BufMut, Buf };
#[derive(Eq)]
#[derive(Eq, Clone)]
pub struct PartialCrosslinkRecord {
pub shard_id: u16,
pub shard_block_hash: Sha256Digest,

View File

@ -1,6 +1,7 @@
use super::rlp::{ RlpStream, Encodable };
use super::utils::types::*;
#[derive(Clone)]
pub struct RecentPropserRecord {
pub index: u32, // TODO: make u24
pub randao_commitment: Sha256Digest,