Skip to content

Commit

Permalink
Merge branch 'main' into e2e-node-api
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhi-singh02 authored Sep 30, 2024
2 parents f4be7e8 + b6c134d commit c1c5e46
Show file tree
Hide file tree
Showing 27 changed files with 147 additions and 163 deletions.
9 changes: 0 additions & 9 deletions mod/consensus/pkg/cometbft/service/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,3 @@ func SetChainID[
](chainID string) func(*Service[LoggerT]) {
return func(s *Service[LoggerT]) { s.chainID = chainID }
}

func (s *Service[_]) SetName(name string) {
s.name = name
}

// SetVersion sets the application's version string.
func (s *Service[_]) SetVersion(v string) {
s.version = v
}
11 changes: 4 additions & 7 deletions mod/consensus/pkg/cometbft/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func NewService[
logger LoggerT,
db dbm.DB,
middleware MiddlewareI,
loadLatest bool,
cmtCfg *cmtcfg.Config,
cs common.ChainSpec,
options ...func(*Service[LoggerT]),
Expand All @@ -102,9 +101,9 @@ func NewService[
Middleware: middleware,
cmtCfg: cmtCfg,
paramStore: params.NewConsensusParamsStore(cs),
version: version.Version,
}

s.SetVersion(version.Version)
s.MountStore(storeKey, storetypes.StoreTypeIAVL)

for _, option := range options {
Expand All @@ -115,11 +114,9 @@ func NewService[
s.sm.CommitMultiStore().SetInterBlockCache(s.interBlockCache)
}

// Load the s.
if loadLatest {
if err := s.sm.LoadLatestVersion(); err != nil {
panic(err)
}
// Load latest height, once all stores have been set
if err := s.sm.LoadLatestVersion(); err != nil {
panic(err)
}

return s
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions mod/node-api/backend/mocks/availability_store.mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions mod/node-api/backend/mocks/beacon_block_header.mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c1c5e46

Please sign in to comment.