aboutsummaryrefslogtreecommitdiff
path: root/src/netgroup.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-09-01 12:12:52 +0100
committerJohn Newbery <john@johnnewbery.com>2022-04-20 14:35:52 +0100
commit6b2268162e96bc4fe1a3ebad454996b1d3d4615c (patch)
tree15caa81795f3a8b503a36489da51c0f718dc62cc /src/netgroup.h
parent19431560e3e1124979c60f39eca9429c4a0df29f (diff)
[netgroupman] Add GetMappedAS() and GetGroup()
These currently call through to the CNetAddr methods. The logic will be moved in a future commit.
Diffstat (limited to 'src/netgroup.h')
-rw-r--r--src/netgroup.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/netgroup.h b/src/netgroup.h
index fcf46bb2bb..46afc6e3c5 100644
--- a/src/netgroup.h
+++ b/src/netgroup.h
@@ -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.
*