Assert that paxos quorum is set
This commit is contained in:
1 parent
e6fd970920
commit
cfa9b4f638
1 file changed
+3
@@ -128,6 +128,9 @@ func max(a uint, b uint) uint {
|
|||||||
// simply a matter of gossipping a new proposal that supersedes all
|
// simply a matter of gossipping a new proposal that supersedes all
|
||||||
// others.
|
// others.
|
||||||
func (node *Node) Propose() {
|
func (node *Node) Propose() {
|
||||||
|
if node.quorum == 0 {
|
||||||
|
panic("Paxos node.Propose() called with no quorum set")
|
||||||
|
}
|
||||||
// Find the highest round number around
|
// Find the highest round number around
|
||||||
round := uint(0)
|
round := uint(0)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user