0.7.42
This commit is contained in:
@@ -978,7 +978,11 @@ fn http_classify_method(method: &str) -> HttpMethodClass {
|
||||
if method == "sendTransaction" || method == "sendRawTransaction" {
|
||||
return HttpMethodClass::SendTransaction;
|
||||
}
|
||||
if method == "getProgramAccounts" || method == "getLargestAccounts" {
|
||||
if method == "getProgramAccounts"
|
||||
|| method == "getLargestAccounts"
|
||||
|| method == "getTransaction"
|
||||
|| method == "getBlock"
|
||||
{
|
||||
return HttpMethodClass::HeavyRead;
|
||||
}
|
||||
return HttpMethodClass::GeneralRpc;
|
||||
@@ -1385,6 +1389,10 @@ mod tests {
|
||||
crate::HttpClient::classify_method("getProgramAccounts"),
|
||||
crate::HttpMethodClass::HeavyRead
|
||||
);
|
||||
assert_eq!(
|
||||
crate::HttpClient::classify_method("getTransaction"),
|
||||
crate::HttpMethodClass::HeavyRead
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user