mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
wallet: IsMine overloads require cs_wallet lock
This commit is contained in:
parent
a13cafc6c6
commit
d8441f30ff
3 changed files with 37 additions and 27 deletions
|
|
@ -37,6 +37,7 @@ namespace {
|
|||
//! Construct wallet tx struct.
|
||||
WalletTx MakeWalletTx(CWallet& wallet, const CWalletTx& wtx)
|
||||
{
|
||||
LOCK(wallet.cs_wallet);
|
||||
WalletTx result;
|
||||
result.tx = wtx.tx;
|
||||
result.txin_is_mine.reserve(wtx.tx->vin.size());
|
||||
|
|
@ -132,7 +133,11 @@ public:
|
|||
{
|
||||
return m_wallet->SignMessage(message, pkhash, str_sig);
|
||||
}
|
||||
bool isSpendable(const CTxDestination& dest) override { return m_wallet->IsMine(dest) & ISMINE_SPENDABLE; }
|
||||
bool isSpendable(const CTxDestination& dest) override
|
||||
{
|
||||
LOCK(m_wallet->cs_wallet);
|
||||
return m_wallet->IsMine(dest) & ISMINE_SPENDABLE;
|
||||
}
|
||||
bool haveWatchOnly() override
|
||||
{
|
||||
auto spk_man = m_wallet->GetLegacyScriptPubKeyMan();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue