beacon: Quick Fix on Typo (#346)

This commit is contained in:
terence tsao
2018-07-29 18:20:20 -07:00
committed by Raul Jordan
parent 1cb300565d
commit 9853f53cc1
2 changed files with 7 additions and 7 deletions

View File

@@ -364,7 +364,7 @@ func (b *BeaconChain) resetAttesterBitfields() error {
return b.persist()
}
// resetTotalDeposit clears and resets the total attester deposit to zero.
// resetTotalAttesterDeposit clears and resets the total attester deposit to zero.
func (b *BeaconChain) resetTotalAttesterDeposit() error {
b.lock.Lock()
defer b.lock.Unlock()
@@ -373,7 +373,7 @@ func (b *BeaconChain) resetTotalAttesterDeposit() error {
return b.persist()
}
// setJustifiedEpoch sets the justified epoch during an epoch transition.
// updateJustifiedEpoch updates the justified epoch during an epoch transition.
func (b *BeaconChain) updateJustifiedEpoch() error {
b.lock.Lock()
defer b.lock.Unlock()
@@ -388,7 +388,7 @@ func (b *BeaconChain) updateJustifiedEpoch() error {
return b.persist()
}
// setRewardsAndPenalties checks if the attester has voted and then applies the
// updateRewardsAndPenalties checks if the attester has voted and then applies the
// rewards and penalties for them.
func (b *BeaconChain) updateRewardsAndPenalties(index int) error {
bitfields := b.state.ActiveState.AttesterBitfields
@@ -412,9 +412,6 @@ func (b *BeaconChain) updateRewardsAndPenalties(index int) error {
return nil
}
// Slashing Condtions
// TODO: Implement all the conditions and add in the methods once the spec is updated
// computeValidatorRewardsAndPenalties is run every epoch transition and appropriates the
// rewards and penalties, resets the bitfield and deposits and also applies the slashing conditions.
func (b *BeaconChain) computeValidatorRewardsAndPenalties() error {
@@ -447,3 +444,6 @@ func (b *BeaconChain) computeValidatorRewardsAndPenalties() error {
}
return nil
}
// Slashing Condtions
// TODO: Implement all the conditions and add in the methods once the spec is updated

View File

@@ -23,7 +23,7 @@ var log = logrus.WithField("prefix", "sync")
// * Decide which messages are forwarded to other peers
// * Filter redundant data and unwanted data
// * Drop peers that send invalid data
// * Trottle incoming requests
// * Throttle incoming requests
type Service struct {
ctx context.Context
cancel context.CancelFunc