Skip to content

Commit

Permalink
use a different kv prefix key for global reputer whitelist because it…
Browse files Browse the repository at this point in the history
… seems reserved by the sdk
  • Loading branch information
kpeluso committed Dec 19, 2024
1 parent 167f9af commit 6833d6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions x/emissions/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ func (s *KeeperTestSuite) TestImportExportGenesisNoError() {
genesisState, err := s.emissionsKeeper.ExportGenesis(s.ctx)
s.Require().NoError(err)

// To avoid a weird bug specific to this list.
// Comment this line to see for yourself.
genesisState.GlobalReputerWhitelist = []string{}

err = s.emissionsKeeper.InitGenesis(s.ctx, genesisState)
s.Require().NoError(err)

Expand Down
5 changes: 3 additions & 2 deletions x/emissions/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var (
InitialForecasterEmaScoreKey = collections.NewPrefix(94)
InitialReputerEmaScoreKey = collections.NewPrefix(95)
GlobalWorkerWhitelistKey = collections.NewPrefix(96)
GlobalReputerWhitelistKey = collections.NewPrefix(97)
GlobalAdminWhitelistKey = collections.NewPrefix(98)
// 97 is a reserved prefix in the SDK!
GlobalReputerWhitelistKey = collections.NewPrefix(98)
GlobalAdminWhitelistKey = collections.NewPrefix(99)
)

0 comments on commit 6833d6a

Please sign in to comment.