raft: specify voters and learners via snapshot

This commit is contained in:
Sergey Kacheev
2020-12-09 18:19:09 +07:00
parent bfc97c1123
commit ccfd00f687
8 changed files with 249 additions and 251 deletions

View File

@@ -24,8 +24,8 @@ func BenchmarkOneNode(b *testing.B) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
s := NewMemoryStorage()
rn := newTestRawNode(1, []uint64{1}, 10, 1, s)
s := newTestMemoryStorage(withPeers(1))
rn := newTestRawNode(1, 10, 1, s)
n := newNode(rn)
go n.run()