aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-12-01 00:36:36 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-03-29 23:29:42 +0200
commit8dbb87a3932f81e23ba7afd865b9aeeb535f0c20 (patch)
tree2b1376e9bb8f6792946c6fabdffdc6a5a73fd8d2 /src/node
parent95cccf8a4b392959c1fd7ec0647e04eb13880865 (diff)
downloadbitcoin-8dbb87a3932f81e23ba7afd865b9aeeb535f0c20.tar.xz
refactor: replace util::Ref by std::any (C++17)
Diffstat (limited to 'src/node')
-rw-r--r--src/node/interfaces.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp
index 50c8c29175..0f4094e14b 100644
--- a/src/node/interfaces.cpp
+++ b/src/node/interfaces.cpp
@@ -38,7 +38,6 @@
#include <uint256.h>
#include <univalue.h>
#include <util/check.h>
-#include <util/ref.h>
#include <util/system.h>
#include <util/translation.h>
#include <validation.h>
@@ -49,6 +48,7 @@
#include <config/bitcoin-config.h>
#endif
+#include <any>
#include <memory>
#include <optional>
#include <utility>
@@ -298,13 +298,13 @@ public:
{
m_context = context;
if (context) {
- m_context_ref.Set(*context);
+ m_context_ref = context;
} else {
- m_context_ref.Clear();
+ m_context_ref.reset();
}
}
NodeContext* m_context{nullptr};
- util::Ref m_context_ref;
+ std::any m_context_ref;
};
bool FillBlock(const CBlockIndex* index, const FoundBlock& block, UniqueLock<RecursiveMutex>& lock, const CChain& active)