Skip to content

Commit

Permalink
Mempool extraction by GasPrice
Browse files Browse the repository at this point in the history
- `Fee()` returns GasPrice instead of GasLimit
- `Fee()` is used to RangeSort txs extraction

See also dusk-network/rusk#605
See also #1240
  • Loading branch information
herr-seppia committed Mar 7, 2022
1 parent 9f41e93 commit e98d625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/core/data/ipc/transactions/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t Transaction) deepCopy() *Transaction {
}
}

// Fee returns GasLimit.
// Fee returns GasPrice.
func (t Transaction) Fee() (uint64, error) {
if t.Payload == nil {
return 0, errors.New("payload is nil")
Expand All @@ -79,7 +79,7 @@ func (t Transaction) Fee() (uint64, error) {
return 0, err
}

return decoded.Fee.GasLimit, nil
return decoded.Fee.GasPrice, nil
}

// GasSpent returns gas spent on transaction execution.
Expand Down

0 comments on commit e98d625

Please sign in to comment.