Skip to content

Commit 9f4ee0f

Browse files
authored
fix: Acquire nil point (#770)
1 parent b450b5c commit 9f4ee0f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

protocol/localstatequery/client.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,16 @@ func (c *Client) Start() {
113113

114114
// Acquire starts the acquire process for the specified chain point
115115
func (c *Client) Acquire(point *common.Point) error {
116+
var msg string
117+
if point != nil {
118+
msg = fmt.Sprintf("calling Acquire(point: {Slot: %d, Hash: %x})", point.Slot, point.Hash)
119+
} else {
120+
msg = "calling Acquire(point: latest)"
121+
}
122+
116123
c.Protocol.Logger().
117124
Debug(
118-
fmt.Sprintf("calling Acquire(point: {Slot: %d, Hash: %x})", point.Slot, point.Hash),
125+
msg,
119126
"component", "network",
120127
"protocol", ProtocolName,
121128
"role", "client",

0 commit comments

Comments
 (0)