From aa338c92a9db01f5b5825230615691dc523a1310 Mon Sep 17 00:00:00 2001 From: Lazy Nina Date: Mon, 30 Dec 2024 19:50:47 -0500 Subject: [PATCH] catch blockNode == nil --- routes/exchange.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routes/exchange.go b/routes/exchange.go index 3b7dda31..b94169c2 100644 --- a/routes/exchange.go +++ b/routes/exchange.go @@ -1447,7 +1447,12 @@ func (fes *APIServer) APIBlock(ww http.ResponseWriter, rr *http.Request) { return } if blockMsg == nil { - APIAddError(ww, fmt.Sprintf("APIBlockRequest: Block with hash %v not found", blockHash)) + APIAddError(ww, fmt.Sprintf("APIBlockRequest: Block with hash %v not found: %v", blockHash)) + return + } + + if blockNode == nil { + APIAddError(ww, fmt.Sprintf("APIBlockRequest: Block node with hash %v not found", blockHash, blockRequest)) return }