This commit is contained in:
Neil Alexander 2018-05-27 22:13:37 +01:00
parent 707e23d392
commit 4c115de633
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
9 changed files with 363 additions and 108 deletions

View file

@ -167,6 +167,9 @@ func (t *switchTable) init(core *Core, key sigPubKey) {
t.updater.Store(&sync.Once{})
t.table.Store(lookupTable{})
t.drop = make(map[sigPubKey]int64)
}
func (t *switchTable) start() error {
doTicker := func() {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
@ -176,6 +179,7 @@ func (t *switchTable) init(core *Core, key sigPubKey) {
}
}
go doTicker()
return nil
}
func (t *switchTable) getLocator() switchLocator {