Browse Source

unexport IsIncluded

wb/txrset
William Banfield 3 years ago
parent
commit
5353718733
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      abci/types/types.go

+ 3
- 3
abci/types/types.go View File

@ -198,7 +198,7 @@ func TxResultsToByteSlices(r []*ExecTxResult) ([][]byte, error) {
return s, nil
}
func (tr *TxRecord) IsIncluded() bool {
func (tr *TxRecord) isIncluded() bool {
return tr.Action == TxRecord_ADDED || tr.Action == TxRecord_UNMODIFIED
}
@ -207,7 +207,7 @@ func (tr *TxRecord) IsIncluded() bool {
func (rpp *ResponsePrepareProposal) IncludedTxs() []*TxRecord {
trs := []*TxRecord{}
for _, tr := range rpp.TxRecords {
if tr.IsIncluded() {
if tr.isIncluded() {
trs = append(trs, tr)
}
}
@ -259,7 +259,7 @@ func (rpp *ResponsePrepareProposal) Validate(maxSizeBytes int64, otxs [][]byte)
ntx := map[string]struct{}{}
var size int64
for _, tr := range rpp.TxRecords {
if tr.IsIncluded() {
if tr.isIncluded() {
size += int64(len(tr.Tx))
if _, ok := ntx[string(tr.Tx)]; ok {
return errors.New("duplicate included transaction")


Loading…
Cancel
Save