Function zebra_state::service::check::anchors::sprout_anchors_refer_to_treestates
source · fn sprout_anchors_refer_to_treestates(
sprout_final_treestates: &HashMap<Root, Arc<NoteCommitmentTree>>,
transaction: &Arc<Transaction>,
transaction_hash: Hash,
tx_index_in_block: Option<usize>,
height: Option<Height>,
) -> Result<(), ValidateContextError>
Expand description
Checks the Sprout anchors specified by transactions
.
Sprout anchors may refer to some earlier block’s final treestate (like
Sapling and Orchard do exclusively) or to the interstitial output
treestate of any prior JoinSplit
within the same transaction.
This method searches for anchors in the supplied sprout_final_treestates
(which must be populated with all treestates pointed to in the semantically_verified
block;
see fetch_sprout_final_treestates()
); or in the interstitial
treestates which are computed on the fly in this function.