Skip to content

Commit

Permalink
Rename follower to citizen
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed Sep 19, 2017
1 parent e25de8c commit 51d531c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/democracy.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Democracy.prototype.init = function(options) {
// Generate the details about this node to be sent between nodes.
self._id = self.options.id;
self._weight = self.options.weight;
self._state = 'follower';
self._state = 'citizen';

// Setup the UDP socket to listen on.
self.socket = dgram.createSocket({type: 'udp4', reuseAddr: true});
Expand Down Expand Up @@ -346,7 +346,7 @@ Democracy.prototype.resign = function(noElection) {
var nodes = self.nodes();

if (self._state === 'leader') {
self._state = 'follower';
self._state = 'citizen';
self.emit('resigned', nodes[self._id]);
self.send('hello');
}
Expand Down

0 comments on commit 51d531c

Please sign in to comment.