mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 21:14:53 +00:00
abci++: update PrepareProposal API to accept just a list of bytes (#9283)
This changes the ResponsePrepareProposal type, substituting the []TxRecord for just []bytes. This change is made in the .proto file and in all necessary additional places in the code.
This commit is contained in:
@@ -136,19 +136,13 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
|
||||
// error for now (the production code calling this function is expected to panic).
|
||||
return nil, err
|
||||
}
|
||||
txrSet := types.NewTxRecordSet(rpp.TxRecords)
|
||||
|
||||
if err := txrSet.Validate(maxDataBytes, block.Txs); err != nil {
|
||||
txl := types.ToTxs(rpp.Txs)
|
||||
if err := txl.Validate(maxDataBytes); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, rtx := range txrSet.RemovedTxs() {
|
||||
if err := blockExec.mempool.RemoveTxByKey(rtx.Key()); err != nil {
|
||||
blockExec.logger.Debug("error removing transaction from the mempool", "error", err, "tx hash", rtx.Hash())
|
||||
}
|
||||
}
|
||||
itxs := txrSet.IncludedTxs()
|
||||
return state.MakeBlock(height, itxs, commit, evidence, proposerAddr), nil
|
||||
return state.MakeBlock(height, txl, commit, evidence, proposerAddr), nil
|
||||
}
|
||||
|
||||
func (blockExec *BlockExecutor) ProcessProposal(
|
||||
|
||||
Reference in New Issue
Block a user