Skip to content

Commit fe37e75

Browse files
committed
coin_age_priority: Avoid mixing potentially different types in std::min
1 parent e13f3fd commit fe37e75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/policy/coin_age_priority.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ void BlockAssembler::addPriorityTxs(const CTxMemPool& mempool, int &nPackagesSel
180180
// How much of the block should be dedicated to high-priority transactions,
181181
// included regardless of the fees they pay
182182
uint64_t nBlockPrioritySize = gArgs.GetIntArg("-blockprioritysize", DEFAULT_BLOCK_PRIORITY_SIZE);
183-
nBlockPrioritySize = std::min(m_options.nBlockMaxSize, nBlockPrioritySize);
183+
if (m_options.nBlockMaxSize < nBlockPrioritySize) {
184+
nBlockPrioritySize = m_options.nBlockMaxSize;
185+
}
184186

185-
if (nBlockPrioritySize == 0) {
187+
if (nBlockPrioritySize <= 0) {
186188
return;
187189
}
188190

0 commit comments

Comments
 (0)