export { PendingBlockType };
var PendingBlockType;
(function (PendingBlockType) {
    /**
     * We got a block root (from a gossip attestation, for exxample) but we don't have the block in forkchoice.
     */
    PendingBlockType["UNKNOWN_BLOCK_ROOT"] = "UnknownBlockRoot";
    /**
     * During gossip time, we may get a block but the parent root is unknown (not in forkchoice).
     */
    PendingBlockType["UNKNOWN_PARENT"] = "unknown_parent";
    /**
     * During gossip we wait for a set amount of time to receive the complete block input but if it does not
     * arrive in time we turn to req/resp to pull the remainder so that it can be processed
     */
    PendingBlockType["INCOMPLETE_BLOCK_INPUT"] = "IncompleteBlockInput";
    PendingBlockType["UNKNOWN_DATA"] = "unknown_data";
})(PendingBlockType || (PendingBlockType = {}));
export { PendingBlockInputStatus };
var PendingBlockInputStatus;
(function (PendingBlockInputStatus) {
    PendingBlockInputStatus["pending"] = "pending";
    PendingBlockInputStatus["fetching"] = "fetching";
    PendingBlockInputStatus["downloaded"] = "downloaded";
    PendingBlockInputStatus["processing"] = "processing";
})(PendingBlockInputStatus || (PendingBlockInputStatus = {}));
export function isPendingBlockInput(pending) {
    return "blockInput" in pending;
}
export function getBlockInputSyncCacheItemRootHex(block) {
    return isPendingBlockInput(block) ? block.blockInput.blockRootHex : block.rootHex;
}
export function getBlockInputSyncCacheItemSlot(block) {
    return isPendingBlockInput(block) ? block.blockInput.slot : "unknown";
}
//# sourceMappingURL=types.js.map