Implement appendentries fully

This commit is contained in:
Smaug123
2022-11-01 21:23:14 +00:00
parent 3ece92e753
commit 5bd6f23a11
6 changed files with 245 additions and 45 deletions

View File

@@ -18,7 +18,7 @@ module Program =
let printClusterState<'a> (cluster : Cluster<'a>) : unit =
for i in 0 .. cluster.ClusterSize - 1 do
printfn "Server %i: %O" i (cluster.State (i * 1<ServerId>))
printfn "Server %i: %O" i (cluster.Status (i * 1<ServerId>))
let getMessage (clusterSize : int) (s : string) : (int<ServerId> * int) option =
match s.Split ',' with
@@ -200,7 +200,7 @@ module Program =
clusterSize
(fun i ->
let i = i * 1<ServerId>
i, cluster.State i
i, cluster.Status i
)
|> Seq.choose (fun (i, status) ->
match status with