diff --git a/lib/pos_fee_estimator.go b/lib/pos_fee_estimator.go index e95aa2e55..aa20acd67 100644 --- a/lib/pos_fee_estimator.go +++ b/lib/pos_fee_estimator.go @@ -222,7 +222,7 @@ func addBlockToTransactionRegister(txnRegister *TransactionRegister, block *Cach if txn.Tx.TxnMeta.GetTxnType() == TxnTypeBlockReward { continue } - + txn.SetValidated(true) if err := txnRegister.AddTransaction(txn); err != nil { return errors.Wrap(err, "PoSFeeEstimator.addBlockToTransactionRegister: error adding txn to pastBlocksTransactionRegister") @@ -670,6 +670,10 @@ func (posFeeEstimator *PoSFeeEstimator) estimateFeeRateNanosPerKBGivenTransactio if !ok { break } + // Skip transactions that aren't validated. + if !tx.IsValidated() { + continue + } totalTxnsSize += tx.TxSizeBytes txns = append(txns, tx) if totalTxnsSize > maxSizeOfNumBlocks {