mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 08:41:02 +00:00
Change Auctions to Eight Lease Periods Per Slot (#2862)
* initial patch * fix tests * fix benchmarks * expose `SlotRange` consts * Update Cargo.lock * fix tests Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
paste = "1.0"
|
||||
enumn = "0.1.3"
|
||||
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -22,6 +22,7 @@ pub use sp_std::{result, ops::Add, convert::TryInto};
|
||||
pub use sp_runtime::traits::CheckedSub;
|
||||
pub use parity_scale_codec::{Encode, Decode};
|
||||
pub use paste;
|
||||
pub use enumn::N;
|
||||
|
||||
/// This macro generates a `SlotRange` enum of arbitrary length for use in the Slot Auction
|
||||
/// mechanism on Polkadot.
|
||||
@@ -106,7 +107,7 @@ macro_rules! generate_slot_range_enum {
|
||||
$( $parsed:ident )*
|
||||
) => {
|
||||
/// A compactly represented sub-range from the series.
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, $crate::Encode, $crate::Decode)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, $crate::Encode, $crate::Decode, $crate::N)]
|
||||
#[repr(u8)]
|
||||
pub enum SlotRange { $( $parsed ),* }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user