tests pass

This commit is contained in:
William Banfield
2022-08-17 11:59:04 -04:00
parent e0663e1837
commit 6dbc09ce2c
3 changed files with 11 additions and 311 deletions
+3 -7
View File
@@ -259,20 +259,16 @@ func (app *CounterApplication) Commit() abci.ResponseCommit {
func (app *CounterApplication) PrepareProposal(
req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
trs := make([]*abci.TxRecord, 0, len(req.Txs))
txs := make([][]byte, 0, len(req.Txs))
var totalBytes int64
for _, tx := range req.Txs {
totalBytes += int64(len(tx))
if totalBytes > req.MaxTxBytes {
break
}
trs = append(trs, &abci.TxRecord{
Action: abci.TxRecord_UNMODIFIED,
Tx: tx,
})
txs = append(txs, tx)
}
return abci.ResponsePrepareProposal{TxRecords: trs}
return abci.ResponsePrepareProposal{Txs: txs}
}
func (app *CounterApplication) ProcessProposal(