Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Solana Errors concrete types #924

Merged
merged 16 commits into from
Dec 20, 2024
Merged

Conversation

michaeldjeffrey
Copy link
Contributor

In attempting to bring the helium-lib PR #850 back up to speed, and considering the ability to incorporate tracking transactions using helium-lib, I was really struggling with all the generics.

All the times an associated Error type was something other than the concrete type used by the actual implementation, it was () of Infallible. So I thought it would be an okay idea to remove the associated types to make some of the errors paths easier to change up without having to chase down a bunch of generics.

  • Removed associated Error
    • Orgs trait
    • SolanaNetwork trait
    • Debiter trait
    • ConfigServer trait
    • PacketWriter trait
  • Removed generics from Error
    • BurnError
    • ConfirmPendingError
    • VerificationError
    • MonitorError
    • ConfigServerError
  • Formatted tokio::select! in iot-packet-verifier burner
  • Simplified generics in Verifier::verify

When the rest of this code starts to use helium-lib proper, this error type will be removed in lieu of mocking a tonic::Status error
@michaeldjeffrey michaeldjeffrey merged commit bad8f0d into main Dec 20, 2024
17 checks passed
@michaeldjeffrey michaeldjeffrey deleted the mj/reify-solana-errors branch December 20, 2024 21:08
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.

4 participants