nolint:gosec // random node id generator does not require cryptographic precision
(che chan error)
| 200 | |
| 201 | //nolint:gosec // random node id generator does not require cryptographic precision |
| 202 | func (n *Node) storeConfChange(che chan error) uint64 { |
| 203 | n.Lock() |
| 204 | defer n.Unlock() |
| 205 | id := rand.Uint64() |
| 206 | _, has := n.confChanges[id] |
| 207 | for has { |
| 208 | id = rand.Uint64() |
| 209 | _, has = n.confChanges[id] |
| 210 | } |
| 211 | n.confChanges[id] = che |
| 212 | return id |
| 213 | } |
| 214 | |
| 215 | // ConfState would return the latest ConfState stored in node. |
| 216 | func (n *Node) ConfState() *raftpb.ConfState { |
no test coverage detected