12#include <boost/test/unit_test.hpp>
19template <
typename... Args>
25 for (
size_t i = 0; i < message.
size(); i++) {
38 std::string
user_agent =
"/Bitcoin ABC:0.0.0(seeder)/";
76 "0000000099f5509b5f36b1926bcf82b21d936ebeadee811030dfbbb7fae915d7"));
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given BIP70 chain name.
const CChainParams & Params()
Return the currently selected parameters.
A CService with information about it as peer.
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
Double ended buffer combining vector and stream-like interfaces.
A combination of a network address (CNetAddr) and a (TCP) port.
uint256 Hash(const T &in1)
Compute the 256-bit hash of an object.
static void CheckMessage(CDataStream &expectedMessage, std::string command, Args &&...args)
BOOST_AUTO_TEST_CASE(simple_header_and_payload_message_writer_test)
static void WriteMessage(CDataStream &stream, std::string command, Args &&...args)
const char * VERSION
The version message provides information about the transmitting node to the receiving node at the beg...
const char * GETHEADERS
The getheaders message requests a headers message that provides block headers starting from a particu...
const char * VERACK
The verack message acknowledges a previously-received version message, informing the connecting node ...
#define BOOST_CHECK_EQUAL(v1, v2)
ServiceFlags
nServices flags.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
A BlockHash is a unqiue identifier for a block.
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
int64_t GetTime()
DEPRECATED Use either ClockType::now() or Now<TimePointType>() if a cast is needed.
uint256 uint256S(const char *str)
uint256 from const char *.
static const int PROTOCOL_VERSION
network protocol versioning