mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
blockfilter: Functions to translate filter types to/from names.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define BITCOIN_BLOCKFILTER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
@@ -89,6 +90,12 @@ enum class BlockFilterType : uint8_t
|
||||
INVALID = 255,
|
||||
};
|
||||
|
||||
/** Get the human-readable name for a filter type. Returns empty string for unknown types. */
|
||||
const std::string& BlockFilterTypeName(BlockFilterType filter_type);
|
||||
|
||||
/** Find a filter type by its human-readable name. */
|
||||
bool BlockFilterTypeByName(const std::string& name, BlockFilterType& filter_type);
|
||||
|
||||
/**
|
||||
* Complete block filter struct as defined in BIP 157. Serialization matches
|
||||
* payload of "cfilter" messages.
|
||||
|
||||
Reference in New Issue
Block a user