comment on exported function CopyPendingPartialWithdrawals should be of the form "CopyPendingPartialWithdrawals ..."
1127 return newSummaries
1128}
1129
1130// CopyPartialWithdrawals copies the provided partial withdrawals.1131func CopyPendingPartialWithdrawals(pws []*PendingPartialWithdrawal) []*PendingPartialWithdrawal {
1132 if pws == nil {
1133 return nil
comment on exported function CopyAttestationsElectra should be of the form "CopyAttestationsElectra ..."
304 return newAttestations
305}
306
307// CopyAttestations copies the provided AttestationElectra array. 308func CopyAttestationsElectra(attestations []*AttestationElectra) []*AttestationElectra {
309 if attestations == nil {
310 return nil
comment on exported function HasETH1WithdrawalCredential should be of the form "HasETH1WithdrawalCredential ..."
487 return lastActivatedvalidatorIndex, nil
488}
489
490// hasETH1WithdrawalCredential returns whether the validator has an ETH1491// Withdrawal prefix. It assumes that the caller has a lock on the state
492func HasETH1WithdrawalCredential(val *ethpb.Validator) bool {
493 if val == nil {
Description
Doc comments work best as complete sentences, which allow a wide variety of automated presentations. The first sentence should be a one-sentence summary that starts with the name being declared.
If every doc comment begins with the name of the item it describes, you can use the doc subcommand of the go tool and run the output through grep.
See https://golang.org/doc/effective_go.html#commentary for more information on how to write good documentation.
Bad practice
package main
// This function tries to summon a cybernetically enhanced duck
func SummonDucks() {
}
Recommended
package main
// SummonDucks tries to summon a cybernetically enhanced duck
func SummonDucks() {
}