core: make IsLowPriority work with pre-calculated fee

Don't recalculate it again and again.
This commit is contained in:
Roman Khimov 2020-02-18 18:42:11 +03:00
parent 37c48b00b4
commit 06daeb44f3
6 changed files with 8 additions and 8 deletions

View file

@ -128,8 +128,8 @@ func (mp *Pool) Add(t *transaction.Transaction, fee Feer) error {
timeStamp: time.Now().UTC(),
perByteFee: fee.FeePerByte(t),
netFee: fee.NetworkFee(t),
isLowPrio: fee.IsLowPriority(t),
}
pItem.isLowPrio = fee.IsLowPriority(pItem.netFee)
mp.lock.Lock()
if !mp.verifyInputs(t) {
mp.lock.Unlock()