Add asmap utility which queries a mapping

The scripts for creating a compact IP->ASN mapping are here:
https://github.com/sipa/asmap

Co-authored-by: Pieter Wuille <pieter.wuille@gmail.com>
This commit is contained in:
Gleb Naumenko
2019-12-18 14:27:03 -05:00
parent 89a1f7a250
commit 8feb4e4b66
3 changed files with 109 additions and 0 deletions

10
src/util/asmap.h Normal file
View File

@@ -0,0 +1,10 @@
// Copyright (c) 2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_UTIL_ASMAP_H
#define BITCOIN_UTIL_ASMAP_H
uint32_t Interpret(const std::vector<bool> &asmap, const std::vector<bool> &ip);
#endif // BITCOIN_UTIL_ASMAP_H