Skip to content

node/cn: hand the downloader a live staking module - #1047

Merged
ian0371 merged 1 commit into
kaiachain:devfrom
hyunsooda:fix/pass-staking-module-to-downloader
Sep 1, 2026
Merged

node/cn: hand the downloader a live staking module#1047
ian0371 merged 1 commit into
kaiachain:devfrom
hyunsooda:fix/pass-staking-module-to-downloader

Conversation

@hyunsooda

@hyunsooda hyunsooda commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

downloader.New was handed manager.stakingModule before it was set, so the downloader kept a nil copy for the life of the process. Pass the module in as a constructor argument.

Types of changes

  • 🐛 Bug fix
  • ✨ Non-hardfork changes (node upgrade not required)
  • 💥 Hardfork / consensus-breaking changes
  • 🧪 Test improvements
  • 🧰 CI / build tool
  • ♻️ Chore / Refactor / Non-functional changes

Checklist

  • 📖 I have read the CONTRIBUTING GUIDELINES doc
  • 📝 I have signed in the PR comment I have read the CLA Document and I hereby sign the CLA in first time contribute after having read CLA
  • 🟢 Lint and unit tests pass locally with my changes ($ make test)

Related issues

Further comments

@hyunsooda hyunsooda self-assigned this Aug 25, 2026
The downloader copies the interface it is given at construction, and the
protocol manager's field was still empty at that point, so registering the
module later left the downloader holding nil. Pass it in as a constructor
argument instead.

Confidence: high
Scope-risk: narrow
Not-tested: cn.New passing a live module (needs a full node bring-up)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hyunsooda
hyunsooda force-pushed the fix/pass-staking-module-to-downloader branch from fc6e11c to e9a1914 Compare August 25, 2026 04:05
@ian0371
ian0371 merged commit e4090c1 into kaiachain:dev Sep 1, 2026
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants