feat(stepable): add ReorgJunctionBlock() returning *pbbstream.BlockMeta#45
Draft
feat(stepable): add ReorgJunctionBlock() returning *pbbstream.BlockMeta#45
Conversation
…BlockRef, add ReorgJunctionBlock returning *pbbstream.BlockMeta Agent-Logs-Url: https://github.com/streamingfast/bstream/sessions/3177c805-f746-444a-843d-05a665ff7b0c Co-authored-by: maoueh <123014+maoueh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Rename ReorgJunctionBlock to ReorgJunctionBlockRef and add new method
feat(stepable): add ReorgJunctionBlock() returning *pbbstream.BlockMeta
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the
Stepableinterface to expose full block metadata at the reorg junction point, giving callers timestamp visibility without a separate block lookup.Interface changes
ReorgJunctionBlock() BlockRef→ renamed toReorgJunctionBlockRef() BlockRefReorgJunctionBlock() *pbbstream.BlockMetaadded, returning id, number, parentId, parentNum, libNum, and timestampImplementation changes
forkable/forkable.go:reorgJunctionBlockfield changed to*pbbstream.BlockMeta;sentChainSwitchSegmentsnow usesjunction.Object.(*ForkableBlock).Block.ToBlocKMeta()instead ofjunction.AsRef();processCompleteBlocksandwrapBlockForkableObjectsignatures updated accordinglycursor_resolver.go:resolve()return type andsendUndoBlocksparam updated to*pbbstream.BlockMeta; junction block set viablkObj.Block.ToBlocKMeta()types.go/preprocess.go:reorgJunctionBlockfield type changed; nil-safeReorgJunctionBlockRef()derives aBlockReffrom the meta fieldstestStepablemock updated;cursor_resolver_test.gocallsReorgJunctionBlockRef()forBlockRef-only assertions; forkable tests use newtinyBlkMeta()helper and compareId/NumberfieldsOriginal prompt
Created from VS Code.