New Cluster Configuration message replaces Options (fixes #63)

This commit is contained in:
Jakob Borg
2014-04-13 15:28:26 +02:00
parent 41c228cb56
commit 5064f846fc
17 changed files with 767 additions and 209 deletions

View File

@@ -1,9 +1,7 @@
package main
import (
"crypto/sha256"
"encoding/xml"
"fmt"
"io"
"reflect"
"sort"
@@ -231,15 +229,6 @@ func (l NodeConfigurationList) Len() int {
return len(l)
}
func clusterHash(nodes []NodeConfiguration) string {
sort.Sort(NodeConfigurationList(nodes))
h := sha256.New()
for _, n := range nodes {
h.Write([]byte(n.NodeID))
}
return fmt.Sprintf("%x", h.Sum(nil))
}
func cleanNodeList(nodes []NodeConfiguration, myID string) []NodeConfiguration {
var myIDExists bool
for _, node := range nodes {