Skip to content

Commit

Permalink
Add 'era_deprecate' macro
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Apr 27, 2023
1 parent f03c232 commit 2dba1e5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mithril-common/src/era/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ mod supported_era;
pub use era_checker::EraChecker;
pub use era_reader::*;
pub use supported_era::*;

/// Macro used to mark the code that should be cleaned up when the new era is activated
#[macro_export]
macro_rules! era_deprecate {
( $comment:literal ) => {};
}
1 change: 1 addition & 0 deletions mithril-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub mod crypto_helper;
pub mod database;
pub mod digesters;
pub mod entities;
#[macro_use]
pub mod era;
pub mod messages;
pub mod signable_builder;
Expand Down
1 change: 1 addition & 0 deletions mithril-common/src/messages/register_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize};

use crate::entities::{HexEncodedSingleSignature, LotteryIndex, PartyId, SignedEntityType};

era_deprecate!("make signed_entity_type of RegisterSignatureMessage not optional");
/// Message structure to register single signature.
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct RegisterSignatureMessage {
Expand Down
1 change: 1 addition & 0 deletions mithril-common/src/messages/register_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
},
};

era_deprecate!("make epoch of RegisterSignerMessage not optional");
/// Register Signer Message
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct RegisterSignerMessage {
Expand Down

0 comments on commit 2dba1e5

Please sign in to comment.