Skip to content

Commit

Permalink
chore: resolve outstanding TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Oct 25, 2024
1 parent d5c970a commit ace0637
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 30 deletions.
1 change: 0 additions & 1 deletion x/tokenomics/token_logic_module/global_mint.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func (tlm tlmProcessorGlobalMint) Process(
})
// Distribute the rewards from within the supplier's module account.
if err := distributeSupplierRewardsToShareHolders(logger, result, TLMGlobalMint, supplier, service.Id, uint64(supplierCoinsToShareAmt)); err != nil {

Check failure on line 130 in x/tokenomics/token_logic_module/global_mint.go

View workflow job for this annotation

GitHub Actions / go-test

shadow: declaration of "err" shadows declaration at line 112 (govet)
// TODO_IN_THIS_COMMIT: reconsider error type...
return tokenomicstypes.ErrTokenomicsModuleMint.Wrapf(
"distributing rewards to supplier with operator address %s shareholders: %v",
supplier.OperatorAddress,
Expand Down
1 change: 0 additions & 1 deletion x/tokenomics/token_logic_module/mint_equals_burn.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func (tlm tlmRelayBurnEqualsMintProcessor) Process(
service.Id,
settlementCoin.Amount.Uint64(),
); err != nil {
// TODO_IN_THIS_COMMIT: reconsider error type...
return tokenomicstypes.ErrTokenomicsModuleMint.Wrapf(
"distributing rewards to supplier with operator address %s shareholders: %v",
supplier.OperatorAddress,
Expand Down
12 changes: 4 additions & 8 deletions x/tokenomics/token_logic_module/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ func (tlm TokenLogicModuleId) EnumIndex() int {
return int(tlm)
}

// TODO_IN_THIS_COMMIT: update after renaming TokenLogicModule to TokenLogicModuleId
// and TokenLogicModuleProcessor to TokenLogicModule.
//
// TokenLogicModuleProcessor is an interface that all token logic modules are
// expected to implement.
// TokenLogicModule is an interface that all token logic modules are expected to implement.
// IMPORTANT_SIDE_EFFECTS: Please note that TLMs may update the application and supplier objects,
// which is why they are passed in as pointers. NOTE: TLMs CANNOT persist any state changes.
// Persistence of updated application and supplier to the keeper is currently done by the TLM
// processor in `ProcessTokenLogicModules()`. This design and separation of concerns may change
// in the future.
// Persistence of updated application and supplier to the keeper is currently done by the
// tokenomics keeper in `ProcessTokenLogicModules()`. This design and separation of concerns
// may change in the future.
// DEV_NOTE: As of writing this, this is only in anticipation of potentially unstaking
// actors if their stake falls below a certain threshold.
type TokenLogicModule interface {
Expand Down
20 changes: 0 additions & 20 deletions x/tokenomics/types/types.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
package types

// This file is in place to declare the package for dynamically generated protobufs

// TODO_IN_THIS_COMMIT: remove...
//
// PendingClaimsResult encapsulates the result of settling pending claims. It is
// intended to be used to represent settled and expired results as unique instances.
type PendingClaimsResult struct {
NumClaims uint64
NumComputeUnits uint64
NumRelays uint64
RelaysPerServiceMap map[string]uint64
}

// TODO_IN_THIS_COMMIT: remove...
//
// NewClaimSettlementResult creates a new PendingClaimsResult.
func NewClaimSettlementResult() PendingClaimsResult {
return PendingClaimsResult{
RelaysPerServiceMap: make(map[string]uint64),
}
}

0 comments on commit ace0637

Please sign in to comment.