Ensure that the Orchard note commitment tree does not exceed its maximum size.
This commit is contained in:
parent
c34162d6dd
commit
dcbbf43d8b
|
@ -3238,7 +3238,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
||||||
sapling_tree.append(outputDescription.cmu);
|
sapling_tree.append(outputDescription.cmu);
|
||||||
}
|
}
|
||||||
|
|
||||||
orchard_tree.AppendBundle(tx.GetOrchardBundle());
|
if (!orchard_tree.AppendBundle(tx.GetOrchardBundle())) {
|
||||||
|
return state.DoS(100,
|
||||||
|
error("ConnectBlock(): the Orchard commitment tree is full."),
|
||||||
|
REJECT_INVALID, "orchard-commitment-tree-full");
|
||||||
|
};
|
||||||
|
|
||||||
if (!(tx.vShieldedSpend.empty() && tx.vShieldedOutput.empty())) {
|
if (!(tx.vShieldedSpend.empty() && tx.vShieldedOutput.empty())) {
|
||||||
total_sapling_tx += 1;
|
total_sapling_tx += 1;
|
||||||
|
|
Loading…
Reference in New Issue