From 3a85d97fd9c2f6cbf0fe129df876797724203796 Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Fri, 13 Jun 2014 15:23:08 -0700 Subject: [PATCH] raft: group Node fields --- raft/node.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/raft/node.go b/raft/node.go index cfb3fa2d9..b48db3914 100644 --- a/raft/node.go +++ b/raft/node.go @@ -18,13 +18,11 @@ type config struct { } type Node struct { - // election timeout and heartbeat timeout in tick + sm *stateMachine + + elapsed tick election tick heartbeat tick - - // elapsed ticks after the last reset - elapsed tick - sm *stateMachine } func New(id int, heartbeat, election tick) *Node {