code builds

This commit is contained in:
William Banfield
2022-08-17 11:48:44 -04:00
parent 1655bf34fc
commit e0663e1837
5 changed files with 33 additions and 217 deletions
+3 -7
View File
@@ -259,20 +259,16 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a
func (app *Application) PrepareProposal(
req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
// None of the transactions are modified by this application.
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}
}
// ProcessProposal implements part of the Application interface.