fedimint_core/epoch.rs
1use fedimint_core::core::DynModuleConsensusItem as ModuleConsensusItem;
2use fedimint_core::encoding::{Decodable, Encodable};
3
4use crate::transaction::Transaction;
5
6/// All the items that may be produced during a consensus epoch
7#[derive(Debug, Clone, Eq, PartialEq, Hash, Encodable, Decodable)]
8pub enum ConsensusItem {
9 /// Threshold sign the epoch history for verification via the API
10 Transaction(Transaction),
11 /// Any data that modules require consensus on
12 Module(ModuleConsensusItem),
13 /// Allows us to add new items in the future without crashing old clients
14 /// that try to interpret the session log.
15 #[encodable_default]
16 Default { variant: u64, bytes: Vec<u8> },
17}