mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 05:45:05 +01:00
test: add ALL_NETWORKS to test utilities
This commit is contained in:
parent
519e76bb64
commit
4a19f501ab
@ -6,9 +6,11 @@
|
||||
#define BITCOIN_TEST_UTIL_NET_H
|
||||
|
||||
#include <compat.h>
|
||||
#include <netaddress.h>
|
||||
#include <net.h>
|
||||
#include <util/sock.h>
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
@ -67,6 +69,16 @@ constexpr ConnectionType ALL_CONNECTION_TYPES[]{
|
||||
ConnectionType::ADDR_FETCH,
|
||||
};
|
||||
|
||||
constexpr auto ALL_NETWORKS = std::array{
|
||||
Network::NET_UNROUTABLE,
|
||||
Network::NET_IPV4,
|
||||
Network::NET_IPV6,
|
||||
Network::NET_ONION,
|
||||
Network::NET_I2P,
|
||||
Network::NET_CJDNS,
|
||||
Network::NET_INTERNAL,
|
||||
};
|
||||
|
||||
/**
|
||||
* A mocked Sock alternative that returns a statically contained data upon read and succeeds
|
||||
* and ignores all writes. The data to be returned is given to the constructor and when it is
|
||||
|
Loading…
Reference in New Issue
Block a user