fix(traverse): don't mess with Byron update epoch (#566)

This commit is contained in:
Santiago Carmuega 2024-12-22 12:11:04 -03:00 committed by GitHub
parent 67789f25cd
commit 50cfce2d87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,9 +183,7 @@ impl<'b> MultiEraBlock<'b> {
match self {
MultiEraBlock::Byron(x) => {
if let Some(up) = x.body.upd_payload.proposal.deref() {
// TODO: this might be horribly wrong, I'm assuming that the activation epoch
// for a Byron upgrade proposal is always current epoch + 1.
let epoch = x.header.consensus_data.0.epoch + 1;
let epoch = x.header.consensus_data.0.epoch;
Some(MultiEraUpdate::Byron(
epoch,
Box::new(Cow::Owned(up.clone())),