Browse Source

remove Get prefix

pull/8094/head
William Banfield 3 years ago
parent
commit
747eb86de8
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
2 changed files with 9 additions and 9 deletions
  1. +3
    -3
      internal/state/execution.go
  2. +6
    -6
      types/tx.go

+ 3
- 3
internal/state/execution.go View File

@ -150,17 +150,17 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
return nil, err return nil, err
} }
for _, rtx := range txrSet.GetRemovedTxs() {
for _, rtx := range txrSet.RemovedTxs() {
if err := blockExec.mempool.RemoveTxByKey(rtx.Key()); err != nil { if err := blockExec.mempool.RemoveTxByKey(rtx.Key()); err != nil {
blockExec.logger.Debug("error removing transaction from the mempool", "error", err, "tx hash", rtx.Hash()) blockExec.logger.Debug("error removing transaction from the mempool", "error", err, "tx hash", rtx.Hash())
} }
} }
for _, atx := range txrSet.GetAddedTxs() {
for _, atx := range txrSet.AddedTxs() {
if err := blockExec.mempool.CheckTx(ctx, atx, nil, mempool.TxInfo{}); err != nil { if err := blockExec.mempool.CheckTx(ctx, atx, nil, mempool.TxInfo{}); err != nil {
blockExec.logger.Error("error adding tx to the mempool", "error", err, "tx hash", atx.Hash()) blockExec.logger.Error("error adding tx to the mempool", "error", err, "tx hash", atx.Hash())
} }
} }
itxs := txrSet.GetIncludedTxs()
itxs := txrSet.IncludedTxs()
return state.MakeBlock(height, itxs, commit, evidence, proposerAddr), nil return state.MakeBlock(height, itxs, commit, evidence, proposerAddr), nil
} }


+ 6
- 6
types/tx.go View File

@ -148,20 +148,20 @@ func NewTxRecordSet(trs []*abci.TxRecord) TxRecordSet {
return txrSet return txrSet
} }
// GetAddedTxs returns the transactions marked for inclusion in a block. This
// AddedTxs returns the transactions marked for inclusion in a block. This
// list maintains the order that the transactions were included in the list of // list maintains the order that the transactions were included in the list of
// TxRecords that were used to construct the TxRecordSet. // TxRecords that were used to construct the TxRecordSet.
func (t TxRecordSet) GetIncludedTxs() []Tx {
func (t TxRecordSet) IncludedTxs() []Tx {
return t.included return t.included
} }
// GetAddedTxs returns the transactions added by the application.
func (t TxRecordSet) GetAddedTxs() []Tx {
// AddedTxs returns the transactions added by the application.
func (t TxRecordSet) AddedTxs() []Tx {
return t.added return t.added
} }
// GetRemovedTxs returns the transactions marked for removal by the application.
func (t TxRecordSet) GetRemovedTxs() []Tx {
// RemovedTxs returns the transactions marked for removal by the application.
func (t TxRecordSet) RemovedTxs() []Tx {
return t.removed return t.removed
} }


Loading…
Cancel
Save