mempool: switch fee estimation to use vsize as a base

In this commit, we modify the fee estimation to use vsize as a base
rather than size. A recent commit landed to track the fee rate using
vsize in the mempool, and also correct some incorrect unit math. This is
a follow up to that commit to ensure that fee estimation is uniform
throughout.
This commit is contained in:
Olaoluwa Osuntokun 2018-02-20 17:05:48 -08:00
parent 56be349be3
commit 34d82682b0

View file

@ -208,7 +208,7 @@ func (ef *FeeEstimator) ObserveTransaction(t *TxDesc) {
hash := *t.Tx.Hash()
if _, ok := ef.observed[hash]; !ok {
size := uint32(t.Tx.MsgTx().SerializeSize())
size := uint32(GetTxVirtualSize(t.Tx))
ef.observed[hash] = &observedTransaction{
hash: hash,