diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2021-10-29 14:06:21 +0200 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2021-12-21 11:31:38 +0700 |
commit | 56113daef4830cad1af3c00f6b3c447c9e2a8e05 (patch) | |
tree | 4303022dd403eeb592dec53c9eb80a96ceb4c0c5 /src/wallet | |
parent | 887796a5ffcbafcd281b920f8d55fcb6e8347584 (diff) |
wallet: add taprootEnabled() to interface
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/interfaces.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp index bba909b807..04501ea5a2 100644 --- a/src/wallet/interfaces.cpp +++ b/src/wallet/interfaces.cpp @@ -461,6 +461,11 @@ public: bool canGetAddresses() override { return m_wallet->CanGetAddresses(); } bool hasExternalSigner() override { return m_wallet->IsWalletFlagSet(WALLET_FLAG_EXTERNAL_SIGNER); } bool privateKeysDisabled() override { return m_wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); } + bool taprootEnabled() override { + if (m_wallet->IsLegacy()) return false; + auto spk_man = m_wallet->GetScriptPubKeyMan(OutputType::BECH32M, /*internal=*/false); + return spk_man != nullptr; + } OutputType getDefaultAddressType() override { return m_wallet->m_default_address_type; } CAmount getDefaultMaxTxFee() override { return m_wallet->m_default_max_tx_fee; } void remove() override |