mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-02 22:21:44 +00:00
Updated naming of EndBlock parameters
* Changes -> Updates for validators * ConsensusParams.XXXParams -> ConsensusParams.XXX * As per feedback from Jae on PR
This commit is contained in:
@ -28,7 +28,7 @@ type PersistentDummyApplication struct {
|
||||
app *DummyApplication
|
||||
|
||||
// validator set
|
||||
changes []*types.Validator
|
||||
updates []*types.Validator
|
||||
|
||||
logger log.Logger
|
||||
}
|
||||
@ -71,7 +71,7 @@ func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.ResponseDelive
|
||||
// format is "val:pubkey/power"
|
||||
if isValidatorTx(tx) {
|
||||
// update validators in the merkle tree
|
||||
// and in app.changes
|
||||
// and in app.updates
|
||||
return app.execValidatorTx(tx)
|
||||
}
|
||||
|
||||
@ -119,13 +119,13 @@ func (app *PersistentDummyApplication) InitChain(req types.RequestInitChain) typ
|
||||
// Track the block hash and header information
|
||||
func (app *PersistentDummyApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock {
|
||||
// reset valset changes
|
||||
app.changes = make([]*types.Validator, 0)
|
||||
app.updates = make([]*types.Validator, 0)
|
||||
return types.ResponseBeginBlock{}
|
||||
}
|
||||
|
||||
// Update the validator set
|
||||
func (app *PersistentDummyApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock {
|
||||
return types.ResponseEndBlock{Changes: app.changes}
|
||||
return types.ResponseEndBlock{Updates: app.updates}
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
@ -216,7 +216,7 @@ func (app *PersistentDummyApplication) updateValidator(v *types.Validator) types
|
||||
}
|
||||
|
||||
// we only update the changes array if we successfully updated the tree
|
||||
app.changes = append(app.changes, v)
|
||||
app.updates = append(app.updates, v)
|
||||
|
||||
return types.ResponseDeliverTx{Code: code.CodeTypeOK}
|
||||
}
|
||||
|
Reference in New Issue
Block a user