mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +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:
@@ -132,6 +132,10 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
SigningResult signMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) override
|
||||
{
|
||||
return m_wallet->SignMessage(message, pkhash, str_sig);
|
||||
}
|
||||
bool isSpendable(const CTxDestination& dest) override { return m_wallet->IsMine(dest) & ISMINE_SPENDABLE; }
|
||||
bool haveWatchOnly() override
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <script/standard.h> // For CTxDestination
|
||||
#include <support/allocators/secure.h> // For SecureString
|
||||
#include <ui_interface.h> // For ChangeType
|
||||
#include <util/message.h>
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
@@ -87,6 +88,9 @@ public:
|
||||
//! Get private key.
|
||||
virtual bool getPrivKey(const CScript& script, const CKeyID& address, CKey& key) = 0;
|
||||
|
||||
//! Sign message
|
||||
virtual SigningResult signMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) = 0;
|
||||
|
||||
//! Return whether wallet has private key.
|
||||
virtual bool isSpendable(const CTxDestination& dest) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user