From 9e0b199b976617edeb1c58d4203df5f83a26c1e3 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 13 Apr 2021 19:41:50 +0800 Subject: external_signer: use const where appropriate --- src/rpc/external_signer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc/external_signer.cpp') diff --git a/src/rpc/external_signer.cpp b/src/rpc/external_signer.cpp index 05d4ce2c91..08aa8d8dcb 100644 --- a/src/rpc/external_signer.cpp +++ b/src/rpc/external_signer.cpp @@ -38,12 +38,12 @@ static RPCHelpMan enumeratesigners() { const std::string command = gArgs.GetArg("-signer", ""); if (command == "") throw JSONRPCError(RPC_MISC_ERROR, "Error: restart bitcoind with -signer="); - std::string chain = gArgs.GetChainName(); + const std::string chain = gArgs.GetChainName(); UniValue signers_res = UniValue::VARR; try { std::vector signers; ExternalSigner::Enumerate(command, signers, chain); - for (ExternalSigner signer : signers) { + for (const ExternalSigner& signer : signers) { UniValue signer_res = UniValue::VOBJ; signer_res.pushKV("fingerprint", signer.m_fingerprint); signer_res.pushKV("name", signer.m_name); -- cgit v1.2.3