Open
Description
Currently we have a status 'omitted' that was meant to imply that we intentionally omitted adding a type. For example if method returns a std lib type
$ bt17 help pruneblockchain
pruneblockchain
Arguments:
1. "height" (numeric, required) The block height to prune up to. May be set to a discrete height, or a unix timestamp
to prune blocks whose block time is at least 2 hours older than the provided timestamp.
Result:
n (numeric) Height of the last block pruned.
This has the problem that later versions of the method might change and we will not catch it.
It would be better to add a version specific type, implement in the client, and an integration test that calls the method. Even for null
, which is currently does as follows:
match self.call("submitblock", &[into_json(hex)?]) {
Ok(serde_json::Value::Null) => Ok(()),
Ok(res) => Err(Error::Returned(res.to_string())),
Err(err) => Err(err.into()),
}
Note that doing this also requires updating the method in verify
(e.g., verify::metho::v17
) to use Method::new_no_model
.
Metadata
Metadata
Assignees
Labels
No labels