From e14ba6c85541d73bc372aadf8868962f23815cfd Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 11 Sep 2020 16:52:58 +0300 Subject: [PATCH] core: fix policy-enforcing network fee check 0.001 should be added to the 'extra' value as per https://neo.org/blog/details/4148 --- pkg/core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 2bcf7c777..812925fcc 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -2003,7 +2003,7 @@ func (bc *Blockchain) PoolTx(t *transaction.Transaction) error { netFee := bc.NetworkFee(t) if maxFree != 0 && txSize > maxFree { if bc.IsLowPriority(netFee) || - netFee < util.Fixed8FromFloat(bc.config.FeePerExtraByte)*util.Fixed8(txSize-maxFree) { + netFee < (util.Fixed8FromFloat(bc.config.LowPriorityThreshold)+util.Fixed8FromFloat(bc.config.FeePerExtraByte)*util.Fixed8(txSize-maxFree)) { return ErrPolicy } }