diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-02-13 17:09:12 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-03-09 11:16:20 -0400 |
commit | 6a9c429084b40356aa36aa67992da35f61c2f6a2 (patch) | |
tree | e2590bf410fd5c78b4e6edd5805ba99802130de6 /src/util/message.h | |
parent | 82a30fade70a2a95c2bbeac4aa06dafda600479d (diff) | |
download | bitcoin-6a9c429084b40356aa36aa67992da35f61c2f6a2.tar.xz |
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.
Diffstat (limited to 'src/util/message.h')
-rw-r--r-- | src/util/message.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/message.h b/src/util/message.h index 01fd14ce2d..b31c5f5761 100644 --- a/src/util/message.h +++ b/src/util/message.h @@ -39,6 +39,12 @@ enum class MessageVerificationResult { OK }; +enum class SigningResult { + OK, //!< No error + PRIVATE_KEY_NOT_AVAILABLE, + SIGNING_FAILED, +}; + /** Verify a signed message. * @param[in] address Signer's bitcoin address, it must refer to a public key. * @param[in] signature The signature in base64 format. @@ -65,4 +71,6 @@ bool MessageSign( */ uint256 MessageHash(const std::string& message); +std::string SigningResultString(const SigningResult res); + #endif // BITCOIN_UTIL_MESSAGE_H |