mempool: use vsize when setting FeePerKB for mempool txs

This commit is contained in:
Johan T. Halseth 2018-02-15 16:06:20 +01:00 committed by Olaoluwa Osuntokun
parent b7930a11ab
commit 56be349be3

View file

@ -527,7 +527,7 @@ func (mp *TxPool) addTransaction(utxoView *blockchain.UtxoViewpoint, tx *btcutil
Added: time.Now(),
Height: height,
Fee: fee,
FeePerKB: fee * 1000 / int64(tx.MsgTx().SerializeSize()),
FeePerKB: fee * 1000 / GetTxVirtualSize(tx),
},
StartingPriority: mining.CalcPriority(tx.MsgTx(), utxoView, height),
}