Skip to content

Commit 878e35b

Browse files
zsfelfoldikaralabe
authored andcommitted
les: fix clientInfo deadlock (#20395)
1 parent 2e98706 commit 878e35b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

les/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (api *PrivateLightServerAPI) clientInfo(c *clientInfo, id enode.ID) map[str
108108
info["priority"] = pb != 0
109109
} else {
110110
info["isConnected"] = false
111-
pb := api.server.clientPool.getPosBalance(id)
111+
pb := api.server.clientPool.ndb.getOrNewPB(id)
112112
info["pricing/balance"], info["pricing/balanceMeta"] = pb.value, pb.meta
113113
info["priority"] = pb.value != 0
114114
}

0 commit comments

Comments
 (0)