Skip to content

Commit

Permalink
stores: remove timeout when creating sql store
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Jun 28, 2024
1 parent e6acd77 commit bf67ee9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions stores/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@ func NewSQLStore(cfg Config) (*SQLStore, modules.ConsensusChangeID, error) {
return nil, modules.ConsensusChangeID{}, fmt.Errorf("failed to create main database: %v", mainErr)
}

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
dbName, dbVersion, err := dbMain.Version(ctx)
dbName, dbVersion, err := dbMain.Version(context.Background())
if err != nil {
return nil, modules.ConsensusChangeID{}, fmt.Errorf("failed to fetch db version: %v", err)
}
Expand All @@ -204,7 +202,7 @@ func NewSQLStore(cfg Config) (*SQLStore, modules.ConsensusChangeID, error) {
}

// Get latest consensus change ID or init db.
ci, ccid, err := initConsensusInfo(ctx, dbMain)
ci, ccid, err := initConsensusInfo(context.Background(), dbMain)
if err != nil {
return nil, modules.ConsensusChangeID{}, err
}
Expand Down

0 comments on commit bf67ee9

Please sign in to comment.