From ad101ca4843d5abf1fce3fec01306b68c68c61da Mon Sep 17 00:00:00 2001 From: pasta Date: Sun, 17 Dec 2023 14:03:04 -0600 Subject: [PATCH] refactor: use string_view --- src/llmq/chainlocks.cpp | 2 +- src/llmq/chainlocks.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llmq/chainlocks.cpp b/src/llmq/chainlocks.cpp index c36b350f20..fbe53daaf7 100644 --- a/src/llmq/chainlocks.cpp +++ b/src/llmq/chainlocks.cpp @@ -91,7 +91,7 @@ CChainLockSig CChainLocksHandler::GetBestChainLock() const return bestChainLock; } -void CChainLocksHandler::ProcessMessage(const CNode& pfrom, const std::string& msg_type, CDataStream& vRecv) +void CChainLocksHandler::ProcessMessage(const CNode& pfrom, std::string_view msg_type, CDataStream& vRecv) { if (!AreChainLocksEnabled(spork_manager)) { return; diff --git a/src/llmq/chainlocks.h b/src/llmq/chainlocks.h index 4d87c29d8b..de9d3adad2 100644 --- a/src/llmq/chainlocks.h +++ b/src/llmq/chainlocks.h @@ -99,7 +99,7 @@ class CChainLocksHandler : public CRecoveredSigsListener bool GetChainLockByHash(const uint256& hash, CChainLockSig& ret) const LOCKS_EXCLUDED(cs); CChainLockSig GetBestChainLock() const LOCKS_EXCLUDED(cs); - void ProcessMessage(const CNode& pfrom, const std::string& msg_type, CDataStream& vRecv); + void ProcessMessage(const CNode& pfrom, std::string_view msg_type, CDataStream& vRecv); void ProcessNewChainLock(NodeId from, const CChainLockSig& clsig, const uint256& hash) LOCKS_EXCLUDED(cs); void AcceptedBlockHeader(gsl::not_null pindexNew) LOCKS_EXCLUDED(cs); void UpdatedBlockTip();