Skip to content

Commit

Permalink
fix: Txs Validate (cometbft#1687)
Browse files Browse the repository at this point in the history
* fix: The calculation method of tx size returned by calling proxyapp should be consistent with that of mempool

* Revert CHANGELOG.md

entries should go into .changelog

---------

Co-authored-by: lasaro <lasaro@informal.systems>
Co-authored-by: lasaro <lasaro@gmail.com>
  • Loading branch information
3 people committed Dec 5, 2023
1 parent 5694bf3 commit eb5d9ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func ToTxs(txl [][]byte) Txs {
func (txs Txs) Validate(maxSizeBytes int64) error {
var size int64
for _, tx := range txs {
size += int64(len(tx))
size += ComputeProtoSizeForTxs([]Tx{tx})
if size > maxSizeBytes {
return fmt.Errorf("transaction data size exceeds maximum %d", maxSizeBytes)
}
Expand Down

0 comments on commit eb5d9ce

Please sign in to comment.