Skip to content

Commit

Permalink
Fix bug in Aura chainspec decoding (#7719)
Browse files Browse the repository at this point in the history
  • Loading branch information
deffrian authored Nov 5, 2024
1 parent 02a14a0 commit 65e9132
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<long, Address> RandomnessContractAddress { get; set; } = new Dictionary<long, Address>();

Expand All @@ -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);
Expand Down Expand Up @@ -150,7 +152,7 @@ public override SortedDictionary<long, long> Read(ref Utf8JsonReader reader, Typ
}
}

private class AuRaValidatorJson
public class AuRaValidatorJson
{
public Address[]? List { get; set; }
public Address? Contract { get; set; }
Expand Down

0 comments on commit 65e9132

Please sign in to comment.