Skip to content

Commit b2cf6d2

Browse files
authored
chore: fix comments (#9958)
Fix some comments
1 parent 3323fdc commit b2cf6d2

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

cl/phase1/core/state/accessors.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ func FinalityDelay(b abstract.BeaconState) uint64 {
8383
return PreviousEpoch(b) - b.FinalizedCheckpoint().Epoch()
8484
}
8585

86-
// Implementation of is_in_inactivity_leak. tells us if network is in danger pretty much. defined in ETH 2.0 specs.
86+
// InactivityLeaking returns whether epochs are in inactivity penalty.
87+
// Implementation of is_in_inactivity_leak as defined in the ETH 2.0 specs.
8788
func InactivityLeaking(b abstract.BeaconState) bool {
8889
return FinalityDelay(b) > b.BeaconConfig().MinEpochsToInactivityPenalty
8990
}
@@ -147,7 +148,7 @@ func IsValidIndexedAttestation(b abstract.BeaconStateBasic, att *cltypes.Indexed
147148
return true, nil
148149
}
149150

150-
// getUnslashedParticipatingIndices returns set of currently unslashed participating indexes
151+
// GetUnslashedParticipatingIndices returns set of currently unslashed participating indexes.
151152
func GetUnslashedParticipatingIndices(b abstract.BeaconState, flagIndex int, epoch uint64) (validatorSet []uint64, err error) {
152153
var participation *solid.BitList
153154
// Must be either previous or current epoch
@@ -172,24 +173,28 @@ func GetUnslashedParticipatingIndices(b abstract.BeaconState, flagIndex int, epo
172173
return
173174
}
174175

175-
// Implementation of is_eligible_for_activation_queue. Specs at: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#is_eligible_for_activation_queue
176+
// IsValidatorEligibleForActivationQueue returns whether the validator is eligible to be placed into the activation queue.
177+
// Implementation of is_eligible_for_activation_queue.
178+
// Specs at: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#is_eligible_for_activation_queue
176179
func IsValidatorEligibleForActivationQueue(b abstract.BeaconState, validator solid.Validator) bool {
177180
return validator.ActivationEligibilityEpoch() == b.BeaconConfig().FarFutureEpoch &&
178181
validator.EffectiveBalance() == b.BeaconConfig().MaxEffectiveBalance
179182
}
180183

181-
// Implementation of is_eligible_for_activation. Specs at: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#is_eligible_for_activation
184+
// IsValidatorEligibleForActivation returns whether the validator is eligible for activation.
185+
// Implementation of is_eligible_for_activation.
186+
// Specs at: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#is_eligible_for_activation
182187
func IsValidatorEligibleForActivation(b abstract.BeaconState, validator solid.Validator) bool {
183188
return validator.ActivationEligibilityEpoch() <= b.FinalizedCheckpoint().Epoch() &&
184189
validator.ActivationEpoch() == b.BeaconConfig().FarFutureEpoch
185190
}
186191

187-
// Check whether a merge transition is complete by verifying the presence of a valid execution payload header.
192+
// IsMergeTransitionComplete returns whether a merge transition is complete by verifying the presence of a valid execution payload header.
188193
func IsMergeTransitionComplete(b abstract.BeaconState) bool {
189194
return !b.LatestExecutionPayloadHeader().IsZero()
190195
}
191196

192-
// Compute the Unix timestamp at the specified slot number.
197+
// ComputeTimestampAtSlot computes the Unix timestamp at the specified slot number.
193198
func ComputeTimestampAtSlot(b abstract.BeaconState, slot uint64) uint64 {
194199
return b.GenesisTime() + (slot-b.BeaconConfig().GenesisSlot)*b.BeaconConfig().SecondsPerSlot
195200
}

eth/tracers/logger/access_list_tracer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (a *AccessListTracer) AccessList() types2.AccessList {
252252
return a.list.accessList()
253253
}
254254

255-
// AccessList returns the current accesslist maintained by the tracer.
255+
// AccessListSorted returns the current accesslist maintained by the tracer.
256256
func (a *AccessListTracer) AccessListSorted() types2.AccessList {
257257
return a.list.accessListSorted()
258258
}

0 commit comments

Comments
 (0)