mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-21 07:24:36 +00:00
Rebased to master the existing ProcessProposal PR (#7752)
* Rebased and git-squashed the commits in PR #7091 - add processproposal proto/boilerplate/logic - mockery - gofmt - fix test - gofmt - move UNKNOWN response behaviour to reject * Fixed build of some UTs * Addressed William's comment on context * Adapted TestProcessProposal * BaseApp needs to ACCEPT vote extensions by default * Added missing ProcessProposal to socket_server.go * Re-renamed TwoThirdPrevote... to Valid... * Addressed William's comment on ProcessProposal error * Addressed Callum's comments * fmt Co-authored-by: mconcat <monoidconcat@gmail.com>
This commit is contained in:
@@ -189,6 +189,16 @@ func (app *PersistentKVStoreApplication) PrepareProposal(
|
||||
return types.ResponsePrepareProposal{BlockData: app.substPrepareTx(req.BlockData)}
|
||||
}
|
||||
|
||||
func (app *PersistentKVStoreApplication) ProcessProposal(
|
||||
req types.RequestProcessProposal) types.ResponseProcessProposal {
|
||||
for _, tx := range req.Txs {
|
||||
if len(tx) == 0 {
|
||||
return types.ResponseProcessProposal{Result: types.ResponseProcessProposal_REJECT}
|
||||
}
|
||||
}
|
||||
return types.ResponseProcessProposal{Result: types.ResponseProcessProposal_ACCEPT}
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
// update validators
|
||||
|
||||
|
||||
Reference in New Issue
Block a user