mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Move direct calls to MessageSign into new SignMessage functions in CWallet and ScriptPubKeyMan
Instead of getting a SigningProvider and then going to MessageSign, have ScriptPubKeyMan handle the message signing internally.
This commit is contained in:
@@ -76,3 +76,17 @@ uint256 MessageHash(const std::string& message)
|
||||
|
||||
return hasher.GetHash();
|
||||
}
|
||||
|
||||
std::string SigningResultString(const SigningResult res)
|
||||
{
|
||||
switch (res) {
|
||||
case SigningResult::OK:
|
||||
return "No error";
|
||||
case SigningResult::PRIVATE_KEY_NOT_AVAILABLE:
|
||||
return "Private key not available";
|
||||
case SigningResult::SIGNING_FAILED:
|
||||
return "Sign failed";
|
||||
// no default case, so the compiler can warn about missing cases
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user