MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / match_index_for

Method match_index_for

nodedb-raft/src/node/core.rs:158–162  ·  view source on GitHub ↗

Query a peer's match_index from the leader's replication state. Returns `None` if this node is not the leader or the peer is unknown.

(&self, peer: u64)

Source from the content-addressed store, hash-verified

156 /// Query a peer's match_index from the leader's replication state.
157 /// Returns `None` if this node is not the leader or the peer is unknown.
158 pub fn match_index_for(&self, peer: u64) -> Option<u64> {
159 self.leader_state
160 .as_ref()
161 .map(|ls| ls.match_index_for(peer))
162 }
163
164 pub fn log_snapshot_index(&self) -> u64 {
165 self.log.snapshot_index()

Callers 2

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected