/
githubmirror
/
bitcoin
Обзор
Документация
Войти
/
githubmirror
/
bitcoin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/ipc/test/fuzz/ipc_fuzz.h
26 строк
920 B
Enoch Azariah
fuzz: add IPC round-trip target
01 июл 2026, 23:27
Не верифицирован
01 июл 2026, 23:27
037ad77
Код
Авторство
О чём код?
// Copyright (c) 2026-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_IPC_TEST_FUZZ_IPC_FUZZ_H #define BITCOIN_IPC_TEST_FUZZ_IPC_FUZZ_H #include <primitives/transaction.h> #include <script/script.h> #include <univalue.h> #include <algorithm> #include <vector> class IpcFuzzImplementation { public: int add(int a, int b) { return a + b; } COutPoint passOutPoint(COutPoint o) { return COutPoint{o.hash, o.n ^ 0xFFFFFFFFu}; } std::vector<uint8_t> passVectorUint8(std::vector<uint8_t> v) { std::reverse(v.begin(), v.end()); return v; } CScript passScript(CScript s) { s << OP_NOP; return s; } UniValue passUniValue(UniValue v) { return v; } CTransactionRef passTransaction(CTransactionRef t) { return t; } }; #endif // BITCOIN_IPC_TEST_FUZZ_IPC_FUZZ_H