From 51d33ad6d46b24c82f3c760bae6a032790892d3e Mon Sep 17 00:00:00 2001 From: Hieu Vu <72878483+hieuvubk@users.noreply.github.com> Date: Thu, 4 Jul 2024 12:44:19 +0700 Subject: [PATCH] fix(runtime/v2): Reset validatorUpdates after each block (#20865) --- runtime/v2/manager.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/v2/manager.go b/runtime/v2/manager.go index 5fa423330e41..0b139c95bc35 100644 --- a/runtime/v2/manager.go +++ b/runtime/v2/manager.go @@ -329,7 +329,11 @@ func (m *MM[T]) EndBlock() ( } } - return validatorUpdates, nil + // Reset validatorUpdates + res := validatorUpdates + validatorUpdates = []appmodulev2.ValidatorUpdate{} + + return res, nil } return endBlockFunc, valUpdateFunc