Compare commits

...

1 Commits

Author SHA1 Message Date
Potuz
5f6d60356b prune the tracked validator cache before updating 2024-01-25 16:07:34 -03:00
2 changed files with 5 additions and 0 deletions

View File

@@ -547,6 +547,8 @@ func (s *Server) PrepareBeaconProposer(w http.ResponseWriter, r *http.Request) {
httputil.HandleError(w, "Could not decode request body: "+err.Error(), http.StatusBadRequest)
return
}
// Prune the tracked validators
s.TrackedValidatorsCache.Prune()
var validatorIndices []primitives.ValidatorIndex
// filter for found fee recipients
for _, r := range jsonFeeRecipients {

View File

@@ -340,6 +340,9 @@ func (vs *Server) PrepareBeaconProposer(
) (*emptypb.Empty, error) {
var validatorIndices []primitives.ValidatorIndex
// Prune the tracked validators
vs.TrackedValidatorsCache.Prune()
for _, r := range request.Recipients {
recipient := hexutil.Encode(r.FeeRecipient)
if !common.IsHexAddress(recipient) {