Assert that IsComplete() in GetSpendData()

This commit is contained in:
Pieter Wuille 2021-06-17 18:14:53 -07:00
parent d8f4b976d5
commit 08f57a0057

View file

@ -504,6 +504,7 @@ WitnessV1Taproot TaprootBuilder::GetOutput() { return WitnessV1Taproot{m_output_
TaprootSpendData TaprootBuilder::GetSpendData() const
{
assert(IsComplete());
TaprootSpendData spd;
spd.merkle_root = m_branch.size() == 0 ? uint256() : m_branch[0]->hash;
spd.internal_key = m_internal_key;