Skip to content

Conversation

@rohenaz
Copy link
Collaborator

@rohenaz rohenaz commented Jun 30, 2025

Summary

Adds context.Context parameter to ChainTracker.IsValidRootForHeight method to enable proper cancellation and timeout support for API calls.

Changes

  • Updated ChainTracker interface to include context parameter
  • Updated all implementations (WhatsOnChain, headers_client, mocks)
  • Updated all callers (MerklePath, BEEF, SPV verification)
  • Updated tests and examples

Breaking Change

This is a breaking change that requires callers to pass context when using ChainTracker methods. Enables better control over HTTP request timeouts and cancellation.

rohenaz added 5 commits June 30, 2025 11:22
Adds context.Context parameter to IsValidRootForHeight method to enable proper cancellation and timeout support for API calls. This is a best practice for operations that make HTTP requests.

Breaking change: All ChainTracker implementations and callers updated to include context parameter.
@rohenaz rohenaz merged commit c6e7b9d into bsv-blockchain:master Jun 30, 2025
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