mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 07:31:03 +00:00
Add feature flag to enable v2 assignments (#2444)
Scaffold everything, so that we can enable v2 assignments via a node feature bit, once all nodes have upgraded to the new protocol. Implements: https://github.com/paritytech/polkadot-sdk/issues/628 --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
committed by
GitHub
parent
6cedb0c78d
commit
84c932cd8a
@@ -22,3 +22,19 @@ use bitvec::vec::BitVec;
|
||||
|
||||
/// Bit indices in the `HostConfiguration.node_features` that correspond to different node features.
|
||||
pub type NodeFeatures = BitVec<u8, bitvec::order::Lsb0>;
|
||||
|
||||
/// Module containing feature-specific bit indices into the `NodeFeatures` bitvec.
|
||||
pub mod node_features {
|
||||
/// A feature index used to indentify a bit into the node_features array stored
|
||||
/// in the HostConfiguration.
|
||||
#[repr(u8)]
|
||||
pub enum FeatureIndex {
|
||||
/// Tells if tranch0 assignments could be sent in a single certificate.
|
||||
/// Reserved for: `<https://github.com/paritytech/polkadot-sdk/issues/628>`
|
||||
EnableAssignmentsV2 = 0,
|
||||
/// First unassigned feature bit.
|
||||
/// Every time a new feature flag is assigned it should take this value.
|
||||
/// and this should be incremented.
|
||||
FirstUnassigned = 1,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user