-
Notifications
You must be signed in to change notification settings - Fork 27
types: 'status' column is not that great #109
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
Comments
|
I have been thinking that the following might be good. //! | JSON-PRC Method Name | support |
//! |:----------------------------------|:-------:|
//! | getbestblockhash | mtype |
//! | getblock | vtype |
//! | getblockchaininfo | std |
//! | getblockcount | null |
(Just an example, these are not the types returned by these methods.) Where |
I think this is much better. It keeps it short and very clear. True, I will love to work on the wrapping std types. Can you please open a separate issue for it, or should I still link it with this issue? |
Added #115 |
The module docs in each version specific module (e.g. `types::v17`) are supposed to be the single source of truth for devs trying to work out which methods are supported and how. Make an effort to better present the information. Note that a bunch docs for methods marked as TODO may be incorrect re version vs version + model. This doesn't matter right now since they will be checked when implemented and also TODO implies no guarantees (in my mind anyway). Note also issue rust-bitcoin#144. `verify` does not check the Returns column against the `Method` constructor type. Close: rust-bitcoin#109
There are a few problems with the 'status' column in the docs of each module e.g,
types/src/v17/mod.rs
. Currently:The 'omitted' status has an explicit meaning of, according to the docs in each module
Perhaps we should have this set of status keys:
And perhaps 'status' is the wrong word - 'support' might be better.
Is it worth the effort to wrap every std type e.g
FooMethod(pub String)
- I did this in some places and not others. The benefit is that we can then provideFooMethod(pub BlockHash)
and implementinto_model
to save users having to do it. The downside is its a bunch more work - is it worth the effort?The text was updated successfully, but these errors were encountered: