forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make validators() rust api compatible with RPC servers (near#10145)
Problem: I have a piece of code in my monitoring tool: ``` let latest_epoch_response = rpc_client .validators(Some(EpochReference::EpochId(EpochId(latest_epoch_id)))) .await.unwrap() ``` And on latest master, this is failing with ``` RpcError { error_struct: Some(RequestValidationError(ParseError { error_message: "Failed parsing args: data did not match any variant of untagged enum BlockId" })), code: -32700, message: "Parse error", data: Some(String("Failed parsing args: data did not match any variant of untagged enum BlockId")) } ``` Solution: change validators() rust api by letting it directly call the "validators" method.
- Loading branch information
Showing
2 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters