From 34d82682b08a8b05fea8513e328e56fcc26d00da Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 20 Feb 2018 17:05:48 -0800 Subject: [PATCH] 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. --- mempool/estimatefee.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempool/estimatefee.go b/mempool/estimatefee.go index e3a46234..ee725240 100644 --- a/mempool/estimatefee.go +++ b/mempool/estimatefee.go @@ -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,