rpc: Quote user supplied descriptor in error msg

This commit is contained in:
MarcoFalke
2022-01-01 00:57:12 +13:00
parent 623745ca74
commit fa4c599145
2 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2018-2021 The Bitcoin Core developers
// Copyright (c) 2018-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -1222,7 +1222,7 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t& key_exp_index, Span<const
error = "A function is needed within P2WSH";
return nullptr;
}
error = strprintf("%s is not a valid descriptor function", std::string(expr.begin(), expr.end()));
error = strprintf("'%s' is not a valid descriptor function", std::string(expr.begin(), expr.end()));
return nullptr;
}