diff options
author | stickies-v <stickies-v@protonmail.com> | 2022-08-31 14:34:53 +0100 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2022-08-31 16:51:32 +0100 |
commit | 89576ccc572fcaf9fb7117ad6124482cc95fbd9f (patch) | |
tree | d8dd332553dba8afac19021307a193dd55de0139 /src/index | |
parent | 83434208035fda9c2b50df7b9f3ede896797cf04 (diff) |
refactor: add LIFETIMEBOUND to blockfilter where needed
Ensure that the return values do not have a lifetime that exceeds
the lifetime of what it is bound to.
See https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#lifetimebound
Diffstat (limited to 'src/index')
-rw-r--r-- | src/index/blockfilterindex.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/index/blockfilterindex.h b/src/index/blockfilterindex.h index 968eccb6b3..a31f7e460e 100644 --- a/src/index/blockfilterindex.h +++ b/src/index/blockfilterindex.h @@ -5,6 +5,7 @@ #ifndef BITCOIN_INDEX_BLOCKFILTERINDEX_H #define BITCOIN_INDEX_BLOCKFILTERINDEX_H +#include <attributes.h> #include <blockfilter.h> #include <chain.h> #include <flatfile.h> @@ -49,9 +50,9 @@ protected: bool CustomRewind(const interfaces::BlockKey& current_tip, const interfaces::BlockKey& new_tip) override; - BaseIndex::DB& GetDB() const override { return *m_db; } + BaseIndex::DB& GetDB() const LIFETIMEBOUND override { return *m_db; } - const char* GetName() const override { return m_name.c_str(); } + const char* GetName() const LIFETIMEBOUND override { return m_name.c_str(); } public: /** Constructs the index, which becomes available to be queried. */ |