state: compute primary routes inside NodeStore snapshot
Add primaries and isPrimary maps to Snapshot plus an election algorithm. No callers yet. Updates #3203
This commit is contained in:
parent
942313a10a
commit
da927eb018
2 changed files with 173 additions and 9 deletions
|
|
@ -150,7 +150,7 @@ func TestSnapshotFromNodes(t *testing.T) {
|
|||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
nodes, peersFunc := tt.setupFunc()
|
||||
snapshot := snapshotFromNodes(nodes, peersFunc)
|
||||
snapshot := snapshotFromNodes(nodes, peersFunc, nil)
|
||||
tt.validate(t, nodes, snapshot)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue