Skip to content

enforce reorg path length limit inside reorgPath#440

Open
Alrighttt wants to merge 3 commits into
masterfrom
matt/reorgPath-maxlen
Open

enforce reorg path length limit inside reorgPath#440
Alrighttt wants to merge 3 commits into
masterfrom
matt/reorgPath-maxlen

Conversation

@Alrighttt

Copy link
Copy Markdown
Contributor

Adds a maxLen parameter to reorgPath and check it inside the rewind loop, so an over-long path short-circuits while it's being walked instead of being fully built and rejected afterward

@github-project-automation github-project-automation Bot moved this to In Progress in Sia Jun 9, 2026
Comment thread chain/manager.go
}

func (m *Manager) reorgPath(a, b types.ChainIndex) (revert, apply []types.ChainIndex, err error) {
func (m *Manager) reorgPath(a, b types.ChainIndex, maxLen int) (revert, apply []types.ChainIndex, err error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's usually good to have test coverage for anything related to validation. Especially in core.

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants