示例#1
0
 public Validator(
     BlsPublicKey publicKey,
     Hash32 withdrawalCredentials,
     Gwei effectiveBalance,
     //bool slashed,
     Epoch activationEligibilityEpoch,
     Epoch activationEpoch,
     Epoch exitEpoch,
     Epoch withdrawableEpoch)
 {
     PublicKey                  = publicKey;
     WithdrawalCredentials      = withdrawalCredentials;
     EffectiveBalance           = effectiveBalance;
     ActivationEligibilityEpoch = activationEligibilityEpoch;
     ActivationEpoch            = activationEpoch;
     ExitEpoch                  = exitEpoch;
     WithdrawableEpoch          = withdrawableEpoch;
 }
示例#2
0
 public void SetSlashings(Epoch slashingsIndex, Gwei amount) => _slashings[(int)(ulong)slashingsIndex] += amount;
示例#3
0
 public void SetBalance(ValidatorIndex validatorIndex, Gwei balance) => _balances[(int)(ulong)validatorIndex] = balance;
示例#4
0
 public void AddValidatorWithBalance(Validator validator, Gwei amount)
 {
     _validators.Add(validator);
     _balances.Add(amount);
 }
示例#5
0
 public void SetEffectiveBalance(Gwei effectiveBalance) => EffectiveBalance = effectiveBalance;