From e98d6253dbbb059c13e1230df92c3fa947b45408 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Mon, 7 Mar 2022 17:38:00 +0100 Subject: [PATCH] Mempool extraction by GasPrice - `Fee()` returns GasPrice instead of GasLimit - `Fee()` is used to RangeSort txs extraction See also dusk-network/rusk#605 See also #1240 --- pkg/core/data/ipc/transactions/transaction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/data/ipc/transactions/transaction.go b/pkg/core/data/ipc/transactions/transaction.go index 5d5ef3c6d..9fb588466 100644 --- a/pkg/core/data/ipc/transactions/transaction.go +++ b/pkg/core/data/ipc/transactions/transaction.go @@ -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") @@ -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.