diff --git a/lib/index.js b/lib/index.js index b4b4afa..12ff695 100644 --- a/lib/index.js +++ b/lib/index.js @@ -454,9 +454,12 @@ function initSet(peer, config) { const tangle = peer.db.getTangle(tangleID) // prettier-ignore - if (!tangle || tangle.size === 0) throw new Error(`isGhostable() tangleID "${tangleID}" is empty`) + if (!tangle || tangle.size === 0) throw new Error(`Tangle "${tangleID}" is locally unknown`) // prettier-ignore - if (!isValidSetMoot(tangle.root)) throw new Error(`minRequiredDepth() "${tangleID}" is not a Set moot`) + if (!MsgV3.isMoot(tangle.root)) throw new Error(`Tangle "${tangleID}" is not a moot`) + const domain = tangle.root.metadata.domain + // prettier-ignore + if (!domain.startsWith(PREFIX)) throw new Error(`Tangle "${tangleID}" is not a Set moot`) // Discover item roots const itemRoots = new Set()