mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 01:09:14 +01:00
Add regression test for serialization bug in IPC mining code that is not currently being called anywhere reported: https://github.com/Sjors/bitcoin/issues/71 https://github.com/chaincodelabs/libmultiprocess/issues/122
31 lines
967 B
C++
31 lines
967 B
C++
// Copyright (c) 2023 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_TEST_IPC_TEST_H
|
|
#define BITCOIN_TEST_IPC_TEST_H
|
|
|
|
#include <primitives/transaction.h>
|
|
#include <script/script.h>
|
|
#include <univalue.h>
|
|
#include <util/fs.h>
|
|
#include <validation.h>
|
|
|
|
class FooImplementation
|
|
{
|
|
public:
|
|
int add(int a, int b) { return a + b; }
|
|
COutPoint passOutPoint(COutPoint o) { return o; }
|
|
UniValue passUniValue(UniValue v) { return v; }
|
|
CTransactionRef passTransaction(CTransactionRef t) { return t; }
|
|
std::vector<char> passVectorChar(std::vector<char> v) { return v; }
|
|
BlockValidationState passBlockState(BlockValidationState s) { return s; }
|
|
CScript passScript(CScript s) { return s; }
|
|
};
|
|
|
|
void IpcPipeTest();
|
|
void IpcSocketPairTest();
|
|
void IpcSocketTest(const fs::path& datadir);
|
|
|
|
#endif // BITCOIN_TEST_IPC_TEST_H
|