#!/usr/bin/env bash
# WEIGHT=10
# CHECK: Some path in miner/ calls engine.Seal — F-11-1
# Either miner/worker.go is patched, or a new file exists (e.g., miner/xdc_agent.go).
set -e
miner_dir="$PATIENT/miner"
[[ -d "$miner_dir" ]] || exit 1
# Pass: any *.go file under miner/ contains a call to engine.Seal( or .Seal(chain (excluding tests).
grep -rE --include='*.go' --exclude='*_test.go' '\.Seal\(' "$miner_dir" | grep -vE '//' | grep -qE '(engine|Engine)\.Seal\('
