Make wildcard storage change subscriptions RPC-unsafe (#11259)

* When an RPC is rejected because it's RPC-unsafe say why in the error message

* Make wildcard storage change subscriptions RPC-unsafe

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Fix typo

* Fix tests

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
KouteandBastian Köcher authored and GitHub committed 2022-04-27 05:35:52 +00:00
1 parent dcc8387dfa
commit 3890fd4cb2
6 files changed
+61 -6

No files matched your search

@@ -290,6 +290,6 @@ mod tests {
let mut response: serde_json::Value = serde_json::from_str(&response).unwrap();
let error: RpcError = serde_json::from_value(response["error"].take()).unwrap();
assert_eq!(error, RpcError::method_not_found())
assert_eq!(error, sc_rpc_api::UnsafeRpcError.into())
}
}