diff --git a/backend/options.go b/backend/options.go index 720ead60..a934ace0 100644 --- a/backend/options.go +++ b/backend/options.go @@ -15,9 +15,9 @@ type backendOptions struct { // ServerOptions is a function for configuring the Server. type ServerOptions func(*backendOptions) -// WithLocations sets the locations assigned to the replicas and +// WithLatencies sets the locations assigned to the replicas and // constructs the corresponding latency matrix. -func WithLocations(id hotstuff.ID, locations []string) ServerOptions { +func WithLatencies(id hotstuff.ID, locations []string) ServerOptions { return func(opts *backendOptions) { opts.id = id opts.latencyMatrix = latency.MatrixFrom(locations) diff --git a/replica/replica.go b/replica/replica.go index a3f55aca..d5c11462 100644 --- a/replica/replica.go +++ b/replica/replica.go @@ -91,7 +91,7 @@ func New(conf Config, builder modules.Builder) (replica *Replica) { } srv.hsSrv = backend.NewServer( - backend.WithLocations(conf.ID, conf.Locations), + backend.WithLatencies(conf.ID, conf.Locations), backend.WithGorumsServerOptions(replicaSrvOpts...), )