Commit 202053f6 authored by masala's avatar masala

fix threshold calculation

the cfg.Authorities excludes the current authority, hence +1
parent 20edd849
......@@ -1360,7 +1360,7 @@ func newState(s *Server) (*state, error) {
st.verifiers[i] = cert.Verifier(auth.IdentityPublicKey)
}
st.verifiers[len(s.cfg.Authorities)] = cert.Verifier(s.IdentityKey())
st.threshold = len(s.cfg.Authorities) / 2
st.threshold = len(s.cfg.Authorities) / 2 + 1
st.dissenters = len(s.cfg.Authorities)/2 - 1
// Initialize the authorized peer tables.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment