Wire Sysio Wire Sysion 1.0.0
|
The tester_network class provides a simplistic virtual P2P network connecting testing_blockchains together. More...
#include <tester_network.hpp>
Public Member Functions | |
void | connect_blockchain (base_tester &new_blockchain) |
Add a new blockchain to the network. | |
void | disconnect_blockchain (base_tester &leaving_blockchain) |
Remove a blockchain from the network. | |
void | disconnect_all () |
Disconnect all blockchains from the network. | |
void | propagate_block (const signed_block &block, const base_tester &skip_db) |
Send a block to all blockchains in this network. | |
Protected Attributes | |
std::map< base_tester *, scoped_connection > | blockchains |
A tester may be connected to zero or more tester_networks at any given time. When a new tester joins the network, it will be synced with all other blockchains already in the network (blocks known only to the new chain will be pushed to the prior network members and vice versa, ignoring blocks not on the main fork). After this, whenever any blockchain in the network gets a new block, that block will be pushed to all other blockchains in the network as well.
Definition at line 19 of file tester_network.hpp.
void sysio::testing::tester_network::connect_blockchain | ( | base_tester & | new_blockchain | ) |
new_blockchain | The blockchain to add |
TODO restore this
Definition at line 5 of file tester_network.cpp.
void sysio::testing::tester_network::disconnect_all | ( | ) |
Definition at line 32 of file tester_network.cpp.
void sysio::testing::tester_network::disconnect_blockchain | ( | base_tester & | leaving_blockchain | ) |
leaving_blockchain | The blockchain to remove |
Definition at line 28 of file tester_network.cpp.
void sysio::testing::tester_network::propagate_block | ( | const signed_block & | block, |
const base_tester & | skip_db ) |
block | The block to send |
Definition at line 36 of file tester_network.cpp.
|
protected |
Definition at line 45 of file tester_network.hpp.