File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,10 @@ NODISCARD inline CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider& fuzze
104
104
{
105
105
// Avoid:
106
106
// policy/feerate.cpp:28:34: runtime error: signed integer overflow: 34873208148477500 * 1000 cannot be represented in type 'long'
107
- const CAmount fee = ConsumeMoney (fuzzed_data_provider) / static_cast <CAmount>(100 );
107
+ //
108
+ // Reproduce using CFeeRate(348732081484775, 10).GetFeePerK()
109
+ const CAmount fee = std::min<CAmount>(ConsumeMoney (fuzzed_data_provider), std::numeric_limits<CAmount>::max () / static_cast <CAmount>(100000 ));
110
+ assert (MoneyRange (fee));
108
111
const int64_t time = fuzzed_data_provider.ConsumeIntegral <int64_t >();
109
112
const unsigned int entry_height = fuzzed_data_provider.ConsumeIntegral <unsigned int >();
110
113
const bool spends_coinbase = fuzzed_data_provider.ConsumeBool ();
You can’t perform that action at this time.
0 commit comments