Skip to content

Commit 8a6b6df

Browse files
committed
fuzz: pass max fee into ConsumeTxMemPoolEntry
1 parent eb15569 commit 8a6b6df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/fuzz/util/mempool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider& fuzzed_data_provider,
1717
// policy/feerate.cpp:28:34: runtime error: signed integer overflow: 34873208148477500 * 1000 cannot be represented in type 'long'
1818
//
1919
// Reproduce using CFeeRate(348732081484775, 10).GetFeePerK()
20-
const CAmount fee = std::min<CAmount>(ConsumeMoney(fuzzed_data_provider), std::numeric_limits<CAmount>::max() / static_cast<CAmount>(100000));
20+
const CAmount fee{ConsumeMoney(fuzzed_data_provider, /*max=*/std::numeric_limits<CAmount>::max() / CAmount{100'000})};
2121
assert(MoneyRange(fee));
2222
const int64_t time = fuzzed_data_provider.ConsumeIntegral<int64_t>();
2323
const unsigned int entry_height = fuzzed_data_provider.ConsumeIntegral<unsigned int>();

0 commit comments

Comments
 (0)