Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/pos_fee_estimator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 {
Expand Down