Skip to content

Commit

Permalink
workaround: insert stake table for epoch 1
Browse files Browse the repository at this point in the history
  • Loading branch information
sveitser committed Dec 16, 2024
1 parent c6b1b8c commit f4da7fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions types/src/v0/impls/stake_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ impl EpochCommittees {
};

let mut map = HashMap::new();
map.insert(Epoch::genesis(), members);
map.insert(Epoch::genesis(), members.clone());
// TODO: remove this, workaround for hotshot asking for stake tables from epoch 1
map.insert(Epoch::genesis() + 1u64, members);

Self {
state: Arc::new(RwLock::new(map)),
Expand Down Expand Up @@ -298,7 +300,9 @@ impl Membership<SeqTypes> for EpochCommittees {
};

let mut map = HashMap::new();
map.insert(Epoch::genesis(), members);
map.insert(Epoch::genesis(), members.clone());
// TODO: remove this, workaround for hotshot asking for stake tables from epoch 1
map.insert(Epoch::genesis() + 1u64, members);

Self {
state: Arc::new(RwLock::new(map)),
Expand Down

0 comments on commit f4da7fd

Please sign in to comment.