core: fix policy-enforcing network fee check

0.001 should be added to the 'extra' value as per https://neo.org/blog/details/4148
This commit is contained in:
Roman Khimov 2020-09-11 16:52:58 +03:00
parent c4d287f326
commit e14ba6c855

View file

@ -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
}
}