mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
[netgroupman] Add GetMappedAS() and GetGroup()
These currently call through to the CNetAddr methods. The logic will be moved in a future commit.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#ifndef BITCOIN_NETGROUP_H
|
||||
#define BITCOIN_NETGROUP_H
|
||||
|
||||
#include <netaddress.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
@@ -20,6 +22,10 @@ public:
|
||||
* exists, since the data is const. */
|
||||
const std::vector<bool>& GetAsmap() const { return m_asmap; }
|
||||
|
||||
std::vector<unsigned char> GetGroup(const CNetAddr& address) const;
|
||||
|
||||
uint32_t GetMappedAS(const CNetAddr& address) const;
|
||||
|
||||
private:
|
||||
/** Compressed IP->ASN mapping, loaded from a file when a node starts.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user