neo-go/pkg/core/mempool/feer.go
Roman Khimov 06f3c34981 mempool: replace timeStamp with blockStamp
Time is not really relevant for us here and we don't use this timestamp in any
way. Yet it occupies 24 bytes and we do two clock_gettime calls to get it.

Replace it with blockStamp which is going to be used in the future for
transaction retransmissions.

It allows to improve single-node TPS by another 3%.
2020-11-11 15:48:13 +03:00

15 lines
436 B
Go

package mempool
import (
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/util"
)
// Feer is an interface that abstract the implementation of the fee calculation.
type Feer interface {
BlockHeight() uint32
NetworkFee(t *transaction.Transaction) util.Fixed8
IsLowPriority(util.Fixed8) bool
FeePerByte(t *transaction.Transaction) util.Fixed8
SystemFee(t *transaction.Transaction) util.Fixed8
}