Skip to content

Commit e1e181f

Browse files
tests: Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...)
1 parent 103b6ec commit e1e181f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/fuzz/kitchen_sink.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5+
#include <rpc/util.h>
56
#include <test/fuzz/FuzzedDataProvider.h>
67
#include <test/fuzz/fuzz.h>
78
#include <test/fuzz/util.h>
@@ -18,5 +19,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
1819
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
1920

2021
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});
22+
(void)JSONRPCTransactionError(transaction_error);
23+
(void)RPCErrorFromTransactionError(transaction_error);
2124
(void)TransactionErrorString(transaction_error);
2225
}

0 commit comments

Comments
 (0)