Skip to content
Snippets Groups Projects
Commit e1725846 authored by benjamin's avatar benjamin
Browse files

glued interfaces together

parent ab7a84fa
No related branches found
No related tags found
2 merge requests!510Release,!431made lower paralell regs unique to js and hacked increase in num registrations...
......@@ -27,6 +27,10 @@ type Registrar interface {
// to register with nodes.
StartProcesses(numParallel uint) stoppable.Stoppable
// IncreaseParallelNodeRegistration increases the number of parallel node
// registrations by num
IncreaseParallelNodeRegistration(num int) func() (stoppable.Stoppable, error)
// GetNodeKeys returns a MixCypher for the topology and a list of nodes it did
// not have a key for. If there are missing keys, then returns nil.
GetNodeKeys(topology *connect.Circuit) (MixCypher, error)
......
......@@ -108,11 +108,11 @@ func (r *registrar) StartProcesses(numParallel uint) stoppable.Stoppable {
// IncreaseParallelNodeRegistration increases the number of parallel node
// registrations by num
func (r *registrar) IncreaseParallelNodeRegistration(numParallel uint) func() (stoppable.Stoppable, error) {
func (r *registrar) IncreaseParallelNodeRegistration(numParallel int) func() (stoppable.Stoppable, error) {
return func() (stoppable.Stoppable, error) {
multi := stoppable.NewMulti("NodeRegistrationsIncrease")
for i := uint(0); i < numParallel; i++ {
for i := uint(0); i < uint(numParallel); i++ {
stop := stoppable.NewSingle("NodeRegistration Increase" + strconv.Itoa(int(i)))
go registerNodes(r, r.session, stop, &r.inProgress, &r.attempts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment