invalidate only required htr cache portion for immutable validators (#5381)

This commit is contained in:
tersec 2023-09-04 19:48:31 +02:00 committed by GitHub
parent bd513ca2ba
commit 41ce581149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -1135,8 +1135,7 @@ proc getStateOnlyMutableValidators(
assign(
dstValidator.withdrawal_credentials,
immutableValidators[i].withdrawal_credentials)
output.validators.resetCache()
output.validators.clearCaches(i)
true
of GetResult.notFound:
@ -1173,8 +1172,7 @@ proc getStateOnlyMutableValidators(
assign(
dstValidator.withdrawal_credentials,
immutableValidators[i].withdrawal_credentials)
output.validators.resetCache()
output.validators.clearCaches(i)
true
of GetResult.notFound:
@ -1208,8 +1206,7 @@ proc getStateOnlyMutableValidators(
# Bypass hash cache invalidation
let dstValidator = addr output.validators.data[i]
assign(dstValidator.pubkey, immutableValidators[i].pubkey.toPubKey())
output.validators.resetCache()
output.validators.clearCaches(i)
true
of GetResult.notFound: