Skip to content

Commit

Permalink
docs: improve Execute code block (#534)
Browse files Browse the repository at this point in the history
1. `InitialHeight` is specified twice
2. The contents of `Execute` refer to the parameter `state` not `s`
  • Loading branch information
rootulp authored Mar 20, 2023
1 parent 8933dd4 commit 9c5158a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spec/core/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ and `ABCIApp` is an ABCI application that can return results and changes to the
set (TODO). Execute is defined as:

```go
func Execute(s State, app ABCIApp, block Block) State {
func Execute(state State, app ABCIApp, block Block) State {
// Fuction ApplyBlock executes block of transactions against the app and returns the new root hash of the app state,
// modifications to the validator set and the changes of the consensus parameters.
AppHash, ValidatorChanges, ConsensusParamChanges := app.ApplyBlock(block)
Expand All @@ -82,7 +82,6 @@ func Execute(s State, app ABCIApp, block Block) State {
InitialHeight: state.InitialHeight,
LastResults: abciResponses.DeliverTxResults,
AppHash: AppHash,
InitialHeight: state.InitialHeight,
LastValidators: state.Validators,
Validators: state.NextValidators,
NextValidators: UpdateValidators(state.NextValidators, ValidatorChanges),
Expand Down

0 comments on commit 9c5158a

Please sign in to comment.