mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02: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:
parent
346e52afd6
commit
fbf485c9b2
4 changed files with 45 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue