From 9f4ee0f0e4bee348747c87196ffc1c727ebcbe1b Mon Sep 17 00:00:00 2001 From: Igor Crevar Date: Mon, 28 Oct 2024 22:15:49 +0100 Subject: [PATCH] fix: Acquire nil point (#770) --- protocol/localstatequery/client.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/protocol/localstatequery/client.go b/protocol/localstatequery/client.go index 0ab65bf2..84968378 100644 --- a/protocol/localstatequery/client.go +++ b/protocol/localstatequery/client.go @@ -113,9 +113,16 @@ func (c *Client) Start() { // Acquire starts the acquire process for the specified chain point func (c *Client) Acquire(point *common.Point) error { + var msg string + if point != nil { + msg = fmt.Sprintf("calling Acquire(point: {Slot: %d, Hash: %x})", point.Slot, point.Hash) + } else { + msg = "calling Acquire(point: latest)" + } + c.Protocol.Logger(). Debug( - fmt.Sprintf("calling Acquire(point: {Slot: %d, Hash: %x})", point.Slot, point.Hash), + msg, "component", "network", "protocol", ProtocolName, "role", "client",