parameter 'root' seems to be unused, consider removing or renaming it as _
260 panic("implement me")
261}
262
263func (b *BeaconBlock) SetStateRoot(root []byte) {264 panic("implement me")
265}
266
parameter 'ctx' seems to be unused, consider removing or renaming it as _
75// state.pending_balance_deposits.append(
76// PendingBalanceDeposit(index=index, amount=balance)
77// )
78func QueueEntireBalanceAndResetValidator(ctx context.Context, s state.BeaconState, idx primitives.ValidatorIndex) error { 79 bal, err := s.BalanceAtIndex(idx)
80 if err != nil {
81 return err
parameter 'ctx' seems to be unused, consider removing or renaming it as _
46// state.pending_balance_deposits.append(
47// PendingBalanceDeposit(index=index, amount=excess_balance)
48// )
49func queueExcessActiveBalance(ctx context.Context, s state.BeaconState, idx primitives.ValidatorIndex) error { 50 bal, err := s.BalanceAtIndex(idx)
51 if err != nil {
52 return err
parameter 'drs' seems to be unused, consider removing or renaming it as _
590 return st, nil
591}
592
593func ProcessDepositReceipts(ctx context.Context, st state.BeaconState, drs []*enginev1.DepositReceipt) (state.BeaconState, error) {594 return st, nil // TODO: EIP-6110
595}
parameter 'ctx' seems to be unused, consider removing or renaming it as _
590 return st, nil
591}
592
593func ProcessDepositReceipts(ctx context.Context, st state.BeaconState, drs []*enginev1.DepositReceipt) (state.BeaconState, error) {594 return st, nil // TODO: EIP-6110
595}
parameter 'activeBalance' seems to be unused, consider removing or renaming it as _
167// state.deposit_balance_to_consume = Gwei(0)
168// else:
169// state.deposit_balance_to_consume = available_for_processing - processed_amount
170func ProcessPendingBalanceDeposits(ctx context.Context, st state.BeaconState, activeBalance uint64) (state.BeaconState, error) {171 _, span := trace.StartSpan(ctx, "electra.ProcessPendingBalanceDeposits")
172 defer span.End()
173
parameter 'ctx' seems to be unused, consider removing or renaming it as _
35// state.earliest_consolidation_epoch = earliest_consolidation_epoch
36//
37// return state.earliest_consolidation_epoch
38func ComputeConsolidationEpochAndUpdateChurn(ctx context.Context, s state.BeaconState, consolidationBalance uint64) (primitives.Epoch, error) {39 earliestEpoch, err := s.EarliestConsolidationEpoch()
40 if err != nil {
41 return 0, err
Description
Unused parameters in functions or methods should be replaced with _
(underscore) or removed.
Functions or methods with unused parameters can be a symptom of unfinished
refactoring or a bug. If an unused parameter is present, it should be named _
(underscore) to avoid raising this issue and better readability.
Bad practice
func abc(unused string) {
fmt.Println("Not using any passed params.")
}
Recommended
func abc(_ string) {
fmt.Println("Not using any passed params.")
}
func abc() {
fmt.Println("Not using any passed params.")
}