Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
tester_network.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "tester.hpp"
4#include <boost/signals2/signal.hpp>
5#include <boost/signals2/shared_connection_block.hpp>
6
7namespace sysio { namespace testing {
8 using namespace boost::signals2;
9
20 public:
25 void connect_blockchain(base_tester &new_blockchain);
26
31 void disconnect_blockchain(base_tester &leaving_blockchain);
32
36 void disconnect_all();
37
42 void propagate_block(const signed_block &block, const base_tester &skip_db);
43
44 protected:
45 std::map<base_tester *, scoped_connection> blockchains;
46 };
47
48} }
The tester_network class provides a simplistic virtual P2P network connecting testing_blockchains tog...
std::map< base_tester *, scoped_connection > blockchains
void disconnect_blockchain(base_tester &leaving_blockchain)
Remove a blockchain from the network.
void propagate_block(const signed_block &block, const base_tester &skip_db)
Send a block to all blockchains in this network.
void disconnect_all()
Disconnect all blockchains from the network.
void connect_blockchain(base_tester &new_blockchain)
Add a new blockchain to the network.