Skip to content

Open a block by its height - #323

Merged
HDauven merged 1 commit into
mainfrom
feat/block-by-height
Nov 3, 2026
Merged

HDauven merged 1 commit into
mainfrom
feat/block-by-height

Conversation

@HDauven

@HDauven HDauven commented Nov 3, 2026

Copy link
Copy Markdown
Member

Fixes #26

  • /blocks/block/?id=27730 opens the block at that height, and a hash still works.
  • /block/27730 redirects there, through static/_redirects. This works on Cloudflare, so it starts working on mainnet with the move.
  • A block that isn't there now says "There's no such block." rather than failing on a null.

Checks: npm run checks passes, and each new test fails without its change. Tried on Cloudflare's local runtime against the mainnet node: /block/27730 lands on the block whose hash is in the issue, and a height past the tip gives the new message.

The block page takes a height as well as a hash, and /block/<height> leads to
it. A block that isn't there says so, rather than failing on a null.
@HDauven
HDauven merged commit 425006a into main Nov 3, 2026
1 check passed
@HDauven
HDauven deleted the feat/block-by-height branch November 3, 2026 16:50
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.

Explorer: Change URL on block page to have height as id instead of hash

1 participant