mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
refactor: Replace const char* to std::string
Some functions should be returning std::string instead of const char*. This commit changes that.
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include <pubkey.h>
|
||||
#include <script/script.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
typedef std::vector<unsigned char> valtype;
|
||||
|
||||
bool fAcceptDatacarrier = DEFAULT_ACCEPT_DATACARRIER;
|
||||
@@ -25,7 +27,7 @@ WitnessV0ScriptHash::WitnessV0ScriptHash(const CScript& in)
|
||||
CSHA256().Write(in.data(), in.size()).Finalize(begin());
|
||||
}
|
||||
|
||||
const char* GetTxnOutputType(txnouttype t)
|
||||
std::string GetTxnOutputType(txnouttype t)
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
@@ -39,7 +41,7 @@ const char* GetTxnOutputType(txnouttype t)
|
||||
case TX_WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash";
|
||||
case TX_WITNESS_UNKNOWN: return "witness_unknown";
|
||||
}
|
||||
return nullptr;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
static bool MatchPayToPubkey(const CScript& script, valtype& pubkey)
|
||||
|
||||
Reference in New Issue
Block a user