mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-15 11:36:00 -05:00
tests: Add fuzzing coverage for StringForFeeReason(...)
This commit is contained in:
parent
a19598cf98
commit
a4e3d13df6
1 changed files with 3 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <test/fuzz/FuzzedDataProvider.h>
|
#include <test/fuzz/FuzzedDataProvider.h>
|
||||||
#include <test/fuzz/fuzz.h>
|
#include <test/fuzz/fuzz.h>
|
||||||
#include <test/fuzz/util.h>
|
#include <test/fuzz/util.h>
|
||||||
|
#include <util/fees.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -23,4 +24,6 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||||
const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee);
|
const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee);
|
||||||
assert(MoneyRange(rounded_fee));
|
assert(MoneyRange(rounded_fee));
|
||||||
}
|
}
|
||||||
|
const FeeReason fee_reason = fuzzed_data_provider.PickValueInArray({FeeReason::NONE, FeeReason::HALF_ESTIMATE, FeeReason::FULL_ESTIMATE, FeeReason::DOUBLE_ESTIMATE, FeeReason::CONSERVATIVE, FeeReason::MEMPOOL_MIN, FeeReason::PAYTXFEE, FeeReason::FALLBACK, FeeReason::REQUIRED});
|
||||||
|
(void)StringForFeeReason(fee_reason);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue