Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Make getting slot info consensus agnostic #2071

Closed
Tracked by #1591
kamilsa opened this issue Apr 29, 2024 · 0 comments · Fixed by #2008
Closed
Tracked by #1591

[Feature Request]: Make getting slot info consensus agnostic #2071

kamilsa opened this issue Apr 29, 2024 · 0 comments · Fixed by #2008
Assignees

Comments

@kamilsa
Copy link
Contributor

kamilsa commented Apr 29, 2024

Component

Consensus

Feature Description

Resolve TODO in block_appender_base.cpp:

outcome::result<BlockAppenderBase::SlotInfo> BlockAppenderBase::getSlotInfo(
      const primitives::BlockHeader &header) const {
    OUTCOME_TRY(
        slot_number,
        babe::getSlot(header));  // TODO(xDimon): Make it consensus agnostic
    auto start_time = slots_util_.get()->slotStartTime(slot_number);
    auto slot_duration = timings_.slot_duration;
    return outcome::success(SlotInfo{start_time, slot_duration});
  }

References and additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants