Stratum crate: add Method enum #558
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
parasitepool/para#558
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Message uses serde_json::Value for params rather than a typed method enum. This means consumers do a two-step parse: match on the method string,
then serde_json::from_value into the concrete type. A typed enum like:
enum Method {
Notify(Notify),
SetDifficulty(SetDifficulty),
Submit(Submit),
// ...
}
would be more ergonomic on the consumer side. The tradeoff is flexibility — Value lets you pass through methods you don't recognize, which
matters for a proxy. Your current approach is pragmatic and arguably the right call for this use case, but it does push parsing responsibility
onto every consumer.