Was tracing an intermittent RPC crash on a pruned archive node. The function sets height = nil when the incoming pointer holds 0, to let CometBFT resolve the latest block. If the subsequent BlockResults call then fails (timeout, pruned state, network error), the error format string at line 71 tries to dereference height, which is now nil. The panic only surfaces under error conditions, so it never shows up in happy-path tests.
Fix is one line: capture the int64 value before nullifying the pointer, then use that value in the error message instead of dereferencing height.