fix: tests, ci failures, minor dep updates#52
Merged
Merged
Conversation
Bump versions for several dependencies to ensure compatibility and security.
Modified the return values of multiSubtreeTestSetup to include allLeaves, subtreeHashes, and blockRoot for improved data handling in tests.
Added a closed flag to sseWriter to ensure that no writes occur after the writer is closed, preventing potential errors during HTTP response finalization.
Refactored status management in sseStoreStub to use a dedicated setStatus method for better concurrency control and clarity.
Refactored input normalization to avoid race conditions by computing defaults into local variables. This change ensures that shared input slices across goroutines remain unmodified, preventing potential data races.
galt-tr
approved these changes
Apr 30, 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.
This pull request introduces several dependency updates, improvements to server-sent events (SSE) handling, and minor codebase cleanups. The most significant changes are grouped below:
Dependency Updates:
go.modto their latest versions, including major libraries such asgithub.com/IBM/sarama,github.com/aerospike/aerospike-client-go/v7,github.com/bsv-blockchain/teranode,github.com/gin-gonic/gin,go.uber.org/zap, and various indirect dependencies. These updates improve security, performance, and compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]SSE (Server-Sent Events) Handling Improvements:
closedflag andclose()method to thesseWriterstruct to ensure that no writes occur after the HTTP response is being finalized, preventing potential race conditions and panics.handleTipStreamandhandleReorgStream) to callwriter.close()when a client disconnects, ensuring proper cleanup. [1] [2]sseStoreStubused in tests with mutex protection for its fixtures, ensuring thread-safety and avoiding race conditions during concurrent access.Testing and Code Quality:
setStatusmethod for updating transaction statuses, improving reliability of SSE E2E tests.Benchmark and Test Infrastructure:
Function Return Value Correction:
multiSubtreeTestSetupto return all expected results, improving test correctness.