mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Allow tr() import only when Taproot is active
To avoid issues around fund loss, only allow descriptor wallets to import tr() descriptors after taproot has activated.
This commit is contained in:
@@ -709,6 +709,12 @@ public:
|
||||
notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */);
|
||||
}
|
||||
}
|
||||
bool isTaprootActive() const override
|
||||
{
|
||||
LOCK(::cs_main);
|
||||
const CBlockIndex* tip = Assert(m_node.chainman)->ActiveChain().Tip();
|
||||
return VersionBitsState(tip, Params().GetConsensus(), Consensus::DEPLOYMENT_TAPROOT, versionbitscache) == ThresholdState::ACTIVE;
|
||||
}
|
||||
NodeContext& m_node;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user