def known

ezx@1.11.0.0 · src/lock/lock.bend:390

import ezx@1.11.0.0/src/lock/lock.bend as Lock
import Base

390# whether the ledger names a package. One it does not name still resolves from
391# the hub, since the hub serves bytes by the hash they digest to, but when the
392# hub does not have it there is nothing else to ask: nothing a clone has says
393# where it came from, so the lock says that and stops.
394def known(ds: List<&2, Origin>, +wanted: String) -> Bool:
395  match ds:
396    case []:
397      False{}
398    case x <> t:
399      any.step(String.eq(origin.hash(x), wanted), _u => known(t, wanted))

Uses (7)

Used by (1)