public AttesterSlashing( IndexedAttestation attestation1, IndexedAttestation attestation2) { Attestation1 = attestation1; Attestation2 = attestation2; }
public bool Equals(IndexedAttestation other) { if (!Equals(Data, other.Data) || !Equals(Signature, other.Signature) || (AttestingIndices?.Length ?? 0) != (other.AttestingIndices?.Length ?? 0)) { return(false); } if (!(AttestingIndices is null)) { if (other.AttestingIndices is null) { return(false); } for (int i = 0; i < AttestingIndices?.Length; i++) { if (AttestingIndices[i] != other.AttestingIndices[i]) { return(false); } } } return(true); }
public static int SszLength(AttesterSlashing?container) { if (container is null) { return(0); } return(2 * sizeof(uint) + IndexedAttestation.SszLength(container.Attestation1) + IndexedAttestation.SszLength(container.Attestation2)); }
public bool Equals(IndexedAttestation other) { if (!Equals(Data, other.Data) || !Equals(Signature, other.Signature) || AttestingIndices.Count != other.AttestingIndices.Count) { return(false); } for (int i = 0; i < AttestingIndices.Count; i++) { if (AttestingIndices[i] != other.AttestingIndices[i]) { return(false); } } return(true); }
public static int SszLength(IndexedAttestation value) { return(SszDynamicOffset + value.AttestingIndices.Length * ValidatorIndex.SszLength); }