Skip to content

Conversation

@samliok
Copy link
Contributor

@samliok samliok commented Sep 11, 2025

Why this should be merged

Not having passing the blockTracker while deserializing a block causes nil pointer exceptions.

How this works

How this was tested

Need to be documented in RELEASES.md?

@joshua-kim joshua-kim moved this to Backlog 🧊 in avalanchego Sep 15, 2025
Base automatically changed from simplex-bb to master September 19, 2025 18:28
Copilot AI review requested due to automatic review settings September 19, 2025 18:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes nil pointer exceptions in block deserialization by ensuring the blockTracker is properly passed to the deserializer. This addresses missing blockTracker initialization that was causing runtime failures when deserializing blocks.

  • Updates blockDeserializer to include a blockTracker field
  • Modifies DeserializeBlock to use newBlock() instead of direct Block struct creation
  • Adds test verification to ensure deserialized blocks can be properly verified

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
simplex/block.go Adds blockTracker field to blockDeserializer and updates DeserializeBlock to use newBlock()
simplex/block_test.go Updates test to initialize blockTracker in deserializer and adds verification test

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@StephenButtolph StephenButtolph added this pull request to the merge queue Sep 19, 2025
Merged via the queue into master with commit 582d3c2 Sep 19, 2025
35 checks passed
@StephenButtolph StephenButtolph deleted the nil-tracker branch September 19, 2025 19:07
@github-project-automation github-project-automation bot moved this from Backlog 🧊 to Done 🎉 in avalanchego Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants