From 65e913297d545bea7d32caac74733879c1302ea6 Mon Sep 17 00:00:00 2001 From: Nikita Mescheryakov Date: Tue, 5 Nov 2024 13:11:18 +0300 Subject: [PATCH] Fix bug in Aura chainspec decoding (#7719) --- .../Config/AuRaChainSpecEngineParameters.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Config/AuRaChainSpecEngineParameters.cs b/src/Nethermind/Nethermind.Consensus.AuRa/Config/AuRaChainSpecEngineParameters.cs index 8f185939b20..c1beed8e1e8 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/Config/AuRaChainSpecEngineParameters.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/Config/AuRaChainSpecEngineParameters.cs @@ -43,7 +43,7 @@ public class AuRaChainSpecEngineParameters : IChainSpecEngineParameters public long ValidateStepTransition { get; set; } [JsonPropertyName("Validators")] - private AuRaValidatorJson ValidatorsJson { get; set; } + public AuRaValidatorJson ValidatorsJson { get; set; } public IDictionary RandomnessContractAddress { get; set; } = new Dictionary(); @@ -58,6 +58,8 @@ public class AuRaChainSpecEngineParameters : IChainSpecEngineParameters public Address WithdrawalContractAddress { get; set; } private AuRaParameters.Validator? _validators; + + [JsonIgnore] public AuRaParameters.Validator Validators { get => _validators ??= LoadValidator(ValidatorsJson); @@ -150,7 +152,7 @@ public override SortedDictionary Read(ref Utf8JsonReader reader, Typ } } - private class AuRaValidatorJson + public class AuRaValidatorJson { public Address[]? List { get; set; } public Address? Contract { get; set; }