2021-12-30 19:36:57 +02:00
|
|
|
// Copyright (c) 2019-2021 The Bitcoin Core developers
|
2019-12-18 14:27:03 -05:00
|
|
|
// 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
|
|
|
|
|
2021-09-01 12:41:47 +01:00
|
|
|
#include <fs.h>
|
|
|
|
|
|
|
|
#include <cstdint>
|
2020-04-02 18:18:08 -07:00
|
|
|
#include <vector>
|
|
|
|
|
2019-12-18 14:27:03 -05:00
|
|
|
uint32_t Interpret(const std::vector<bool> &asmap, const std::vector<bool> &ip);
|
|
|
|
|
2020-04-02 18:18:08 -07:00
|
|
|
bool SanityCheckASMap(const std::vector<bool>& asmap, int bits);
|
|
|
|
|
2021-09-01 12:41:47 +01:00
|
|
|
/** Read asmap from provided binary file */
|
|
|
|
std::vector<bool> DecodeAsmap(fs::path path);
|
|
|
|
|
2019-12-18 14:27:03 -05:00
|
|
|
#endif // BITCOIN_UTIL_ASMAP_H
|