Skip to content

Commit 4e8629d

Browse files
committed
update sandbox to latest cosmos sdk changes
2 parents 30a2818 + f4eca53 commit 4e8629d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+480
-601
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

cmd/callisto/main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import (
99

1010
migratecmd "github.com/forbole/callisto/v4/cmd/migrate"
1111
parsecmd "github.com/forbole/callisto/v4/cmd/parse"
12-
"github.com/forbole/callisto/v4/utils"
13-
14-
"github.com/forbole/callisto/v4/types/config"
15-
1612
"github.com/forbole/callisto/v4/database"
1713
"github.com/forbole/callisto/v4/modules"
14+
"github.com/forbole/callisto/v4/types/config"
15+
"github.com/forbole/callisto/v4/utils"
1816
)
1917

2018
func main() {

cmd/migrate/cmd.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ import (
1313

1414
type Migrator func(parseCfg *parsecmdtypes.Config) error
1515

16-
var (
17-
migrations = map[string]Migrator{
18-
"v3": v3.RunMigration,
19-
"v5": v5.RunMigration,
20-
}
21-
)
16+
var migrations = map[string]Migrator{
17+
"v3": v3.RunMigration,
18+
"v5": v5.RunMigration,
19+
}
2220

2321
func getVersions() []string {
2422
var versions []string

cmd/migrate/v3/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func RunMigration(parseConfig *parsecmdtypes.Config) error {
3939
return fmt.Errorf("error while serializing config: %s", err)
4040
}
4141

42-
err = os.WriteFile(config.GetConfigFilePath(), bz, 0600)
42+
err = os.WriteFile(config.GetConfigFilePath(), bz, 0o600)
4343
if err != nil {
4444
return fmt.Errorf("error while writing v3 config: %s", err)
4545
}

cmd/parse/gov/proposal.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ func refreshProposalDetails(parseCtx *parser.Context, proposalID uint64, govModu
126126

127127
// Handle the MsgSubmitProposal messages
128128
for index, msg := range tx.GetMsgs() {
129-
130129
switch msg.(type) {
131130
case *govtypesv1.MsgSubmitProposal, *govtypesv1beta1.MsgSubmitProposal:
132131
err = govModule.HandleMsg(index, tx.Body.Messages[index], tx)

database/auth.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ func (db *Db) storeVestingAccount(account exported.VestingAccount) (int, error)
112112
time.Unix(account.GetEndTime(), 0),
113113
time.Unix(account.GetStartTime(), 0),
114114
).Scan(&vestingAccountRowID)
115-
116115
if err != nil {
117116
return vestingAccountRowID, fmt.Errorf("error while saving Vesting Account of type %v: %s", proto.MessageName(account), err)
118117
}

database/consensus_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,15 @@ func (suite *DbTestSuite) TestSaveConsensus_SaveAverageBlockTimeGenesis() {
307307
func (suite *DbTestSuite) TestSaveConsensus_SaveGenesisData() {
308308
err := suite.database.SaveGenesis(types.NewGenesis(
309309
"testnet-1",
310-
time.Date(2020, 1, 02, 15, 00, 00, 000, time.UTC),
310+
time.Date(2020, 1, 0o2, 15, 0o0, 0o0, 0o00, time.UTC),
311311
0,
312312
))
313313
suite.Require().NoError(err)
314314

315315
// Should have only one row
316316
err = suite.database.SaveGenesis(types.NewGenesis(
317317
"testnet-2",
318-
time.Date(2020, 1, 1, 15, 00, 00, 000, time.UTC),
318+
time.Date(2020, 1, 1, 15, 0o0, 0o0, 0o00, time.UTC),
319319
0,
320320
))
321321

@@ -324,7 +324,7 @@ func (suite *DbTestSuite) TestSaveConsensus_SaveGenesisData() {
324324
suite.Require().Len(rows, 1)
325325
suite.Require().True(rows[0].Equal(dbtypes.NewGenesisRow(
326326
"testnet-2",
327-
time.Date(2020, 1, 1, 15, 00, 00, 000, time.UTC),
327+
time.Date(2020, 1, 1, 15, 0o0, 0o0, 0o00, time.UTC),
328328
0,
329329
)))
330330
}
@@ -333,15 +333,15 @@ func (suite *DbTestSuite) TestSaveConsensus_GetGenesis() {
333333
_, err := suite.database.Sqlx.Exec(
334334
`INSERT INTO genesis(chain_id, time, initial_height) VALUES ($1, $2, $3)`,
335335
"testnet-1",
336-
time.Date(2020, 1, 1, 15, 00, 00, 000, time.UTC),
336+
time.Date(2020, 1, 1, 15, 0o0, 0o0, 0o00, time.UTC),
337337
0,
338338
)
339339

340340
genesis, err := suite.database.GetGenesis()
341341
suite.Require().NoError(err)
342342
suite.Require().True(genesis.Equal(types.NewGenesis(
343343
"testnet-1",
344-
time.Date(2020, 1, 1, 15, 00, 00, 000, time.UTC),
344+
time.Date(2020, 1, 1, 15, 0o0, 0o0, 0o00, time.UTC),
345345
0,
346346
)))
347347
}

database/feegrant.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ WHERE fee_grant_allowance.height <= excluded.height`
4343
func (db *Db) DeleteFeeGrantAllowance(allowance types.GrantRemoval) error {
4444
stmt := `DELETE FROM fee_grant_allowance WHERE grantee_address = $1 AND granter_address = $2 AND height <= $3`
4545
_, err := db.SQL.Exec(stmt, allowance.Grantee, allowance.Granter, allowance.Height)
46-
4746
if err != nil {
4847
return fmt.Errorf("error while deleting grant allowance: %s", err)
4948
}

database/feegrant_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func (suite *DbTestSuite) TestBigDipperDb_SaveFeeGrantAllowance() {
3535
suite.Require().Equal(rows[0].Granter, granter.String())
3636
suite.Require().Equal(rows[0].Grantee, grantee.String())
3737
suite.Require().Equal(rows[0].Height, int64(121622))
38-
3938
}
4039

4140
func (suite *DbTestSuite) TestBigDipperDb_RemoveFeeGrantAllowance() {

0 commit comments

Comments
 (0)