Skip to content

Commit

Permalink
improves docs
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Sep 26, 2024
1 parent 77e31ca commit b8b7b5a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions consensus/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ LOOP:
}

// NOTE: since the priv key is set when the msgs are received
// it will attempt to eg double sign but we can just ignore it
// since the votes will be replayed and we'll get to the next step
// it will attempt to e.g., double sign, but we can just ignore it
// since the votes will be replayed, and we'll get to the next step
if err := cs.readReplayMessage(msg, nil); err != nil {
return err
}
Expand Down Expand Up @@ -363,7 +363,7 @@ func (h *Handshaker) ReplayBlocksWithContext(
state.Version.Consensus.App = state.ConsensusParams.Version.AppVersion
}

// update tiemouts based on the app response
// update timeouts based on the InitChainSync response
state.TimeoutCommit = res.Timeouts.TimeoutCommit
state.TimeoutPropose = res.Timeouts.TimeoutPropose

Expand Down
4 changes: 2 additions & 2 deletions state/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type dbStore struct {

type StoreOptions struct {

// DiscardABCIResponses determines whether or not the store
// DiscardABCIResponses determines whether the store
// retains all ABCIResponses. If DiscardABCiResponses is enabled,
// the store will maintain only the response object from the latest
// height.
Expand Down Expand Up @@ -236,7 +236,7 @@ func (store dbStore) Bootstrap(state State) error {
// guaranteed to delete all states, since the last checkpointed state and states being pointed to by
// e.g. `LastHeightChanged` must remain. The state at to must also exist.
//
// The from parameter is necessary since we can't do a key scan in a performant way due to the key
// The `from` parameter is necessary since we can't do a key scan in a performant way due to the key
// encoding not preserving ordering: https://github.com/tendermint/tendermint/issues/4567
// This will cause some old states to be left behind when doing incremental partial prunes,
// specifically older checkpoints and LastHeightChanged targets.
Expand Down
5 changes: 2 additions & 3 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (bs *BlockStore) Size() int64 {
return bs.height - bs.base + 1
}

// LoadBase atomically loads the base block meta, or returns nil if no base is found.
// LoadBaseMeta atomically loads the base block meta, or returns nil if no base is found.
func (bs *BlockStore) LoadBaseMeta() *types.BlockMeta {
bs.mtx.RLock()
defer bs.mtx.RUnlock()
Expand Down Expand Up @@ -197,8 +197,7 @@ func (bs *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
return blockMeta
}

// LoadBlockMetaByHash returns the blockmeta who's header corresponds to the given
// hash. If none is found, returns nil.
// LoadBlockMetaByHash returns the blockmeta whose header corresponds to the given hash. If none is found, returns nil.
func (bs *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta {
bz, err := bs.db.Get(calcBlockHashKey(hash))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ func (blockID *BlockID) ToProto() cmtproto.BlockID {
}
}

// FromProto sets a protobuf BlockID to the given pointer.
// BlockIDFromProto sets a protobuf BlockID to the given pointer.
// It returns an error if the block id is invalid.
func BlockIDFromProto(bID *cmtproto.BlockID) (*BlockID, error) {
if bID == nil {
Expand Down

0 comments on commit b8b7b5a

Please sign in to comment.