Skip to content

Commit

Permalink
do not store stake table for e+1, e+2 in add_epoch_root()
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Mar 7, 2025
1 parent 95bb765 commit 924bdfc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions types/src/v0/impls/stake_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,9 @@ impl EpochCommittees {
};

self.state.insert(epoch, committee.clone());
self.state.insert(epoch + 1, committee.clone());
self.state.insert(epoch + 2, committee.clone());

self.randomized_committees
.insert(epoch, randomized_committee.clone());
self.randomized_committees
.insert(epoch + 1, randomized_committee.clone());
self.randomized_committees
.insert(epoch + 2, randomized_committee.clone());
}

// We need a constructor to match our concrete type.
Expand Down Expand Up @@ -306,7 +301,7 @@ impl EpochCommittees {

// TODO: remove this, workaround for hotshot asking for stake tables from epoch 1 and 2
let mut map = HashMap::new();
for epoch in Epoch::genesis().u64()..=50 {
for epoch in Epoch::genesis().u64()..=2 {
map.insert(Epoch::new(epoch), members.clone());
randomized_committees.insert(Epoch::new(epoch), randomized_committee.clone());
}
Expand Down

0 comments on commit 924bdfc

Please sign in to comment.