This commit is contained in:
2026-05-24 17:17:26 +02:00
parent 6176c5d4cd
commit 69c8f6c957
25 changed files with 2354 additions and 133 deletions

View File

@@ -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]