Rpc: add filter to getProgramAccounts (#10888)
* Add RpcFilterType, and implement CompareBytes for getProgramAccounts * Accept bytes in bs58 * Rename to memcmp * Add Memcmp optional encoding field * Add dataSize filter * Update docs * Clippy * Simplify tests that don't need to test account contents; add multiple-filter tests
This commit is contained in:
@ -121,14 +121,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");
|
||||
assert_eq!(the_error, "Invalid param: 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");
|
||||
assert_eq!(the_error, "Invalid param: Invalid");
|
||||
|
||||
// test invalid get_account_info request
|
||||
let req = json_req!("getAccountInfo", json!([bob_pubkey.to_string()]));
|
||||
|
Reference in New Issue
Block a user