diff options
| author | practicalswift <[email protected]> | 2020-04-22 14:40:32 +0000 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2020-04-26 20:23:56 +0000 |
| commit | e1e181fad1a73e9dee38a2bd74518e1b8d446930 (patch) | |
| tree | dde0e8f037de76a7e49b75e46ea5ff531eb5d713 /src/test/fuzz | |
| parent | tests: Add fuzzing coverage for TransactionErrorString(...) (diff) | |
| download | discoin-e1e181fad1a73e9dee38a2bd74518e1b8d446930.tar.xz discoin-e1e181fad1a73e9dee38a2bd74518e1b8d446930.zip | |
tests: Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...)
Diffstat (limited to 'src/test/fuzz')
| -rw-r--r-- | src/test/fuzz/kitchen_sink.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/fuzz/kitchen_sink.cpp b/src/test/fuzz/kitchen_sink.cpp index 92c56ae58..af6dc7132 100644 --- a/src/test/fuzz/kitchen_sink.cpp +++ b/src/test/fuzz/kitchen_sink.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <rpc/util.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> @@ -18,5 +19,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED}); + (void)JSONRPCTransactionError(transaction_error); + (void)RPCErrorFromTransactionError(transaction_error); (void)TransactionErrorString(transaction_error); } |