Fixup deserialize_bs58_transaction, and make a few error types more targeted (#10171)

automerge
This commit is contained in:
Tyera Eulberg
2020-05-21 18:30:02 -06:00
committed by GitHub
parent 18be7a7966
commit 12a3b1ba6a
2 changed files with 21 additions and 18 deletions

View File

@ -120,14 +120,14 @@ fn test_rpc_invalid_requests() {
let json = post_rpc(req, &leader_data);
let the_error = json["error"]["message"].as_str().unwrap();
assert_eq!(the_error, "Invalid request");
assert_eq!(the_error, "Invalid");
// test invalid get_account_info request
let req = json_req!("getAccountInfo", json!(["invalid9999"]));
let json = post_rpc(req, &leader_data);
let the_error = json["error"]["message"].as_str().unwrap();
assert_eq!(the_error, "Invalid request");
assert_eq!(the_error, "Invalid");
// test invalid get_account_info request
let req = json_req!("getAccountInfo", json!([bob_pubkey.to_string()]));