Skip to content

Commit

Permalink
Problem: chainID config in client.toml is not enforced
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 20, 2023
1 parent 760f8b9 commit 1366025
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Improvements

- [#](https://github.com/crypto-org-chain/cronos/pull/) Enforce chainID config in client.toml.

*October 17, 2023*

## v1.1.0-rc1
Expand Down
3 changes: 3 additions & 0 deletions cmd/cronosd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a
}
chainID = conf.ChainID
}
if len(chainID) == 0 {
panic("chainID not set")
}
baseappOptions := server.DefaultBaseappOptions(appOpts)
baseappOptions = append(baseappOptions, func(app *baseapp.BaseApp) {
baseapp.SetChainID(chainID)
Expand Down

0 comments on commit 1366025

Please sign in to comment.