From cfa9b4f638ff5df7d70475519ec98a4b2ea58c8a Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 23 Mar 2016 14:49:20 +0000 Subject: [PATCH] Assert that paxos quorum is set --- ipam/paxos/paxos.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipam/paxos/paxos.go b/ipam/paxos/paxos.go index e8386a2f..3a956269 100644 --- a/ipam/paxos/paxos.go +++ b/ipam/paxos/paxos.go @@ -128,6 +128,9 @@ func max(a uint, b uint) uint { // simply a matter of gossipping a new proposal that supersedes all // others. func (node *Node) Propose() { + if node.quorum == 0 { + panic("Paxos node.Propose() called with no quorum set") + } // Find the highest round number around round := uint(0)