Skip to content
Merged
Show file tree
Hide file tree
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: 4 additions & 2 deletions lib/pos_fee_estimator.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,9 @@ func (posFeeEstimator *PoSFeeEstimator) EstimateFeeRateNanosPerKB(minFeeRateNano
defer posFeeEstimator.rwLock.RUnlock()

mempoolCongestionFactorBasisPoints := posFeeEstimator.globalParams.MempoolCongestionFactorBasisPoints
mempoolPriorityPercentileBasisPoints := posFeeEstimator.globalParams.MempoolPriorityPercentileBasisPoints
pastBlocksCongestionFactorBasisPoints := posFeeEstimator.globalParams.MempoolPastBlocksCongestionFactorBasisPoints

mempoolPriorityPercentileBasisPoints := posFeeEstimator.globalParams.MempoolPriorityPercentileBasisPoints
pastBlocksPriorityPercentileBasisPoints := posFeeEstimator.globalParams.MempoolPastBlocksPriorityPercentileBasisPoints

maxBlockSize := posFeeEstimator.globalParams.SoftMaxBlockSizeBytesPoS
Expand Down Expand Up @@ -335,8 +336,9 @@ func (posFeeEstimator *PoSFeeEstimator) EstimateFee(txn *MsgDeSoTxn, minFeeRateN
defer posFeeEstimator.rwLock.RUnlock()

mempoolCongestionFactorBasisPoints := posFeeEstimator.globalParams.MempoolCongestionFactorBasisPoints
mempoolPriorityPercentileBasisPoints := posFeeEstimator.globalParams.MempoolPriorityPercentileBasisPoints
pastBlocksCongestionFactorBasisPoints := posFeeEstimator.globalParams.MempoolPastBlocksCongestionFactorBasisPoints

mempoolPriorityPercentileBasisPoints := posFeeEstimator.globalParams.MempoolPriorityPercentileBasisPoints
pastBlocksPriorityPercentileBasisPoints := posFeeEstimator.globalParams.MempoolPastBlocksPriorityPercentileBasisPoints

maxBlockSize := posFeeEstimator.globalParams.SoftMaxBlockSizeBytesPoS
Expand Down
12 changes: 12 additions & 0 deletions lib/pos_snapshot_entries.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ func MergeGlobalParamEntryDefaults(globalParamsEntry *GlobalParamsEntry, params
if globalParamsEntryCopy.MempoolFeeEstimatorNumPastBlocks == 0 {
globalParamsEntryCopy.MempoolFeeEstimatorNumPastBlocks = params.DefaultMempoolFeeEstimatorNumPastBlocks
}
if globalParamsEntryCopy.MempoolCongestionFactorBasisPoints == 0 {
globalParamsEntryCopy.MempoolCongestionFactorBasisPoints = params.DefaultMempoolCongestionFactorBasisPoints
}
if globalParamsEntryCopy.MempoolPastBlocksCongestionFactorBasisPoints == 0 {
globalParamsEntryCopy.MempoolPastBlocksCongestionFactorBasisPoints = params.DefaultMempoolPastBlocksCongestionFactorBasisPoints
}
if globalParamsEntryCopy.MempoolPriorityPercentileBasisPoints == 0 {
globalParamsEntryCopy.MempoolPriorityPercentileBasisPoints = params.DefaultMempoolPriorityPercentileBasisPoints
}
if globalParamsEntryCopy.MempoolPastBlocksPriorityPercentileBasisPoints == 0 {
globalParamsEntryCopy.MempoolPastBlocksPriorityPercentileBasisPoints = params.DefaultMempoolPastBlocksPriorityPercentileBasisPoints
}
if globalParamsEntryCopy.MaxBlockSizeBytesPoS == 0 {
globalParamsEntryCopy.MaxBlockSizeBytesPoS = params.DefaultMaxBlockSizeBytesPoS
}
Expand Down