Files
thehub/libs/p2p/P2PNetInterface.h
T
TomZ 25ffc84f80 Introduce new lib p2p
We reuse the NetworkManager lower level code in order to connect
to the Bitcoin P2P network.
This implements the basics for anyone wanting to be a player on
this network.
2020-04-20 21:49:03 +02:00

20 lines
450 B
C++

#ifndef P2PNETINTERFACE_H
#define P2PNETINTERFACE_H
#include "PeerAddressDB.h"
class P2PNetInterface
{
public:
P2PNetInterface() = default;
virtual ~P2PNetInterface();
virtual void newPeer(int peerId, const std::string &userAgent, int startHeight, PeerAddress address) {};
virtual void lostPeer(int peerId) {}
virtual void punishMentChanged(int peerId) {}
virtual void blockchainHeightChanged(int newHeight) {}
};
#endif