aboutsummaryrefslogtreecommitdiff
path: root/src/netgroup.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-09-01 16:34:23 +0100
committerJohn Newbery <john@johnnewbery.com>2022-04-20 14:35:53 +0100
commit4709fc2019e27e74be02dc5fc123b9f6f46d7990 (patch)
tree25170c62329cab5a2a8afe7989f785f59d7ac9a0 /src/netgroup.cpp
parent1b978a7e8c71dcc1501705022e66f6779c8c4528 (diff)
downloadbitcoin-4709fc2019e27e74be02dc5fc123b9f6f46d7990.tar.xz
[netgroupman] Move asmap checksum calculation to NetGroupManager
Diffstat (limited to 'src/netgroup.cpp')
-rw-r--r--src/netgroup.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/netgroup.cpp b/src/netgroup.cpp
index a2f1f3460f..5f42d6c719 100644
--- a/src/netgroup.cpp
+++ b/src/netgroup.cpp
@@ -4,8 +4,16 @@
#include <netgroup.h>
+#include <hash.h>
#include <util/asmap.h>
+uint256 NetGroupManager::GetAsmapChecksum() const
+{
+ if (!m_asmap.size()) return {};
+
+ return SerializeHash(m_asmap);
+}
+
std::vector<unsigned char> NetGroupManager::GetGroup(const CNetAddr& address) const
{
std::vector<unsigned char> vchRet;