Skip to content

Commit

Permalink
rename DAStakeTable to DaMembers
Browse files Browse the repository at this point in the history
  • Loading branch information
tbro committed Dec 13, 2024
1 parent 475087a commit c6b1b8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions types/src/v0/impls/stake_table.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::{
v0_3::{DAStakeTable, StakeTable, StakeTables},
v0_3::{DaMembers, StakeTable, StakeTables},
L1Client, NodeState, PubKey, SeqTypes,
};

Expand Down Expand Up @@ -33,7 +33,7 @@ use url::Url;
type Epoch = <SeqTypes as NodeType>::Epoch;

impl StakeTables {
pub fn new(stake_table: StakeTable, da_members: DAStakeTable) -> Self {
pub fn new(stake_table: StakeTable, da_members: DaMembers) -> Self {
Self {
stake_table,
da_members,
Expand Down
7 changes: 4 additions & 3 deletions types/src/v0/v0_3/stake_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ pub struct PermissionedStakeTableEntry(NodeInfoJf);
#[derive(Debug, Clone, Serialize, Deserialize, From)]
pub struct CombinedStakeTable(Vec<PeerConfigKeys<PubKey>>);

// NewTypes for two types of stake tables to avoid confusion
#[derive(Clone, Debug, From, Into)]
pub struct DAStakeTable(pub Vec<StakeTableEntry<PubKey>>);
/// NewType to disambiguate DA Membership
pub struct DaMembers(pub Vec<StakeTableEntry<PubKey>>);

#[derive(Clone, Debug, From, Into)]
/// NewType to disambiguate StakeTable
pub struct StakeTable(pub Vec<StakeTableEntry<PubKey>>);

#[derive(Clone, Debug)]
pub struct StakeTables {
pub stake_table: StakeTable,
pub da_members: DAStakeTable,
pub da_members: DaMembers,
}

0 comments on commit c6b1b8c

Please sign in to comment.