From 5c7f31800f9c89e15da78dbb5ccc78ae26ff2f02 Mon Sep 17 00:00:00 2001 From: Diane Gallois-Wong Date: Thu, 15 Feb 2024 17:02:20 +0100 Subject: [PATCH] Proto/validate: check delegate is not forbidden in mempool mode too --- src/proto_alpha/lib_protocol/validate.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_protocol/validate.ml b/src/proto_alpha/lib_protocol/validate.ml index afdc22de05dc..b24594a23cc6 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -503,7 +503,6 @@ module Consensus = struct let*? consensus_key, voting_power = get_delegate_details consensus_info.preattestation_slot_map kind slot in - let* () = check_delegate_is_not_forbidden vi.ctxt consensus_key.delegate in return (consensus_key, voting_power) (** Preattestation checks for Construction mode. @@ -532,7 +531,6 @@ module Consensus = struct let*? consensus_key, voting_power = get_delegate_details consensus_info.preattestation_slot_map kind slot in - let* () = check_delegate_is_not_forbidden vi.ctxt consensus_key.delegate in return (consensus_key, voting_power) (** Preattestation/attestation checks for Mempool mode. @@ -615,6 +613,7 @@ module Consensus = struct Preattestation consensus_content in + let* () = check_delegate_is_not_forbidden vi.ctxt consensus_key.delegate in let*? () = if check_signature then Operation.check_signature @@ -716,7 +715,6 @@ module Consensus = struct let*? consensus_key, voting_power = get_delegate_details consensus_info.attestation_slot_map kind slot in - let* () = check_delegate_is_not_forbidden vi.ctxt consensus_key.delegate in let* () = Option.fold ~none:return_unit @@ -763,6 +761,7 @@ module Consensus = struct Attestation consensus_content in + let* () = check_delegate_is_not_forbidden vi.ctxt consensus_key.delegate in let*? () = if check_signature then Operation.check_signature -- GitLab