Skip to content

Conversation

@icellan
Copy link
Contributor

@icellan icellan commented Nov 17, 2025

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

🤖 Claude Code Review

Status: Complete

Summary

This PR corrects the error type for write permit acquisition failures from NewProcessingError to NewStorageError. This aligns with how other file storage operations handle errors throughout the same file.

Issue Found

There is an inconsistency between read and write permit error handling:

  • Line 280 (acquireReadPermit): Uses NewProcessingError for semaphore acquisition failures
  • Line 303 (acquireWritePermit): Now uses NewStorageError (after this PR)

Both functions handle semaphore acquisition for the same purpose (controlling filesystem access), so they should use the same error type. Since all other file storage operations in this file use NewStorageError, the read permit function should also be updated for consistency.

Recommendation

Consider updating line 280 in a follow-up PR to use NewStorageError instead of NewProcessingError to maintain consistency across both semaphore acquisition functions.

@icellan icellan merged commit a7ed7d9 into bsv-blockchain:main Nov 17, 2025
10 checks passed
@icellan icellan self-assigned this Nov 17, 2025
rid3thespiral pushed a commit to rid3thespiral/teranode that referenced this pull request Nov 18, 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.

3 participants