Commit 491751bd authored by inphi's avatar inphi

only cache latest eth_calls

parent 16c3d1ec
......@@ -197,6 +197,15 @@ func (e *EthCallMethodHandler) cacheKey(req *RPCReq) string {
if len(input) != 2 {
return ""
}
var blockTag string
if err := json.Unmarshal(input[1], &blockTag); err != nil {
return ""
}
// The eth_call cache is used as a LVC. Only the latest calls are cached as these are used the most
if blockTag != "latest" {
return ""
}
var params ethCallParams
if err := json.Unmarshal(input[0], &params); err != nil {
return ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment