Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-develope committed Jun 27, 2024
1 parent faf3033 commit ee8a324
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions runtime/v2/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ type Store interface {
// SetInitialVersion sets the initial version of the store.
SetInitialVersion(uint64) error

// WorkingHash writes the provided changeset to the state and returns
// the working hash of the state.
WorkingHash(changeset *store.Changeset) (store.Hash, error)

// Commit commits the provided changeset and returns the new state root of the state.
Commit(changeset *store.Changeset) (store.Hash, error)

// Query is a key/value query directly to the underlying database. This skips the appmanager
Expand Down
3 changes: 2 additions & 1 deletion server/v2/cometbft/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ func (c *Consensus[T]) InitChain(ctx context.Context, req *abciproto.InitChainRe

// store chainID to be used later on in execution
c.chainID = req.ChainId
c.cfg.InitialHeight = uint64(req.InitialHeight) // TODO: cfg is loaded initially ???
// TODO: check if we need to load the config from genesis.json or config.toml
c.cfg.InitialHeight = uint64(req.InitialHeight)

// On a new chain, we consider the init chain block height as 0, even though
// req.InitialHeight is 1 by default.
Expand Down

0 comments on commit ee8a324

Please sign in to comment.