Skip to main content

own_contract_hashes

Function own_contract_hashes 

Source
pub fn own_contract_hashes(
    table: &UnitTable,
    own_types: &HashMap<String, Arc<TypeDecl>>,
) -> BTreeMap<String, String>
Expand description

v0.177 (#643): a context’s own on call contract hashes, keyed by service name — the constants its Worker entry compares an incoming X-Bynk-Contract against.

Built by projecting each local on call handler into the same CrossContextService shape crate::symbols::build_cross_context_info hands a caller for the same service, via the one shared projection cross_context_service_for, and hashing it from the same combined type table. That symmetry is the whole correctness argument: a caller and a callee compiled from one source tree must agree, or the check fires on every call instead of only on real skew — sharing the projection makes the agreement structural rather than two hand-written copies staying in sync by convention.