#!/usr/bin/env bash
# WEIGHT=4
# CHECK: Inbound VotePacket handler reaches EngineV2.VoteHandler (W-1)
set -e
handler="$PATIENT/eth/handler_eth.go"
[[ -f "$handler" ]] || exit 1
# Inside the case for *eth.VotePacket (or VotePacket), there must be a path to VoteHandler — not just `return nil`.
awk '/case \*?eth\.VotePacket/,/case |^[[:space:]]*default:|^}/' "$handler" | \
  grep -qE '(VoteHandler|bft.*Vote|Vote\(.*\))'
