Skip to content

x/bank: Clarify intent for TrackDelegation/TrackUndelegation TODO comments #25144

@meetrick

Description

@meetrick

Question

In x/bank/keeper/keeper.go, there are two TODO comments:

// TODO: return error on account.TrackDelegation
vacc.TrackDelegation(sdkCtx.BlockHeader().Time, balance, amt)

// TODO: return error on account.TrackDelegation  
vacc.TrackUndelegation(amt)

What is the intended behavior?

Should I..

  1. Change the interface to return errors instead of panicking?
  2. Keep current interface but add error handling in keeper?
  3. Something else?

Current Behavior

  • TrackDelegation/TrackUndelegation panic on invalid conditions
  • No error return values

Impact

  • Interface change = breaking change
  • Requires updating all implementations and tests

Please clarify the intended direction before implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions