Skip to content

fix(x/bme): init epochs store#2054

Merged
troian merged 1 commit intomainfrom
genesis-init
Mar 20, 2026
Merged

fix(x/bme): init epochs store#2054
troian merged 1 commit intomainfrom
genesis-init

Conversation

@troian
Copy link
Member

@troian troian commented Mar 20, 2026

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Signed-off-by: Artur Troian <troian@users.noreply.github.com>
@troian troian requested a review from a team as a code owner March 20, 2026 11:54
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 394122c1-b94b-4849-a338-b8197dc18ef1

📥 Commits

Reviewing files that changed from the base of the PR and between 09c8b0f and d27388e.

📒 Files selected for processing (2)
  • x/bme/keeper/execute_burn_mint_test.go
  • x/bme/keeper/genesis.go

Walkthrough

Test initialization updated to use a constant value for block height, and genesis initialization refactored to manage two distinct epochs during state setup instead of managing a single epoch.

Changes

Cohort / File(s) Summary
Test Setup
x/bme/keeper/execute_burn_mint_test.go
Block height initialization changed from literal 1 to types.DefaultMinEpochBlocks constant.
Genesis Initialization
x/bme/keeper/genesis.go
Epoch state setup refactored to initialize both epochMint and epochBurn epochs in k.epochs instead of single k.mintEpoch initialization, using data.Params.MinEpochBlocks for next epoch height.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Two epochs dance where once was one,
MinBlocks bloom as constants in the sun,
Mint and Burn in harmony align,
Genesis kindly sets the line!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is incomplete with only a template and unchecked checklist items, but the PR title and file changes indicate the purpose relates to epochs store initialization in the BME module. Complete the PR description with details about what epochs are being initialized and why this fixes an issue, and check off applicable checklist items.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(x/bme): init epochs store' clearly summarizes the main change: initializing the epochs store in the BME module keeper during genesis.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch genesis-init
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

@troian troian merged commit 7b0feb3 into main Mar 20, 2026
15 checks passed
@troian troian deleted the genesis-init branch March 20, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant