Skip to content

test(p2p): provide tail in partial range store - #409

Draft
loglapa wants to merge 1 commit into
celestiaorg:mainfrom
loglapa:fix/partial-range-store-tail
Draft

test(p2p): provide tail in partial range store#409
loglapa wants to merge 1 commit into
celestiaorg:mainfrom
loglapa:fix/partial-range-store-tail

Conversation

@loglapa

@loglapa loglapa commented Aug 21, 2026

Copy link
Copy Markdown

Follow-up to #406.

handleRangeRequest now queries Tail before checking the requested range. The focused partialRangeStore test double embedded a nil header.Store, so its inherited Tail method panicked and made the current main test suite fail deterministically.

Give the test double an explicit tail at the requested lower bound and implement Tail, preserving the original test path: the range is not below tail, HasAt remains false, and the assertion still verifies that to is not expanded to the distant head.

Validation

  • go test ./...
  • go vet ./...
  • golangci-lint run
  • go test ./p2p -run ^'TestExchangeServer_partialRangeNotExpanded$' -count=100\n- go test -race ./p2p -run ^'TestExchangeServer_partialRangeNotExpanded$' -count=20\n- docker run --rm -v "$PWD:/workspace" -w /workspace golang:1.27 go test ./...

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