beacon: add constructor

This commit is contained in:
Joost Jager
2022-04-13 10:19:25 +02:00
parent 57e08dfa54
commit 7265a5e42b
2 changed files with 8 additions and 4 deletions

View File

@ -595,10 +595,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
quit: make(chan struct{}),
}
s.witnessBeacon = &preimageBeacon{
wCache: dbs.ChanStateDB.NewWitnessCache(),
subscribers: make(map[uint64]*preimageSubscriber),
}
s.witnessBeacon = newPreimageBeacon(dbs.ChanStateDB.NewWitnessCache())
currentHash, currentHeight, err := s.cc.ChainIO.GetBestBlock()
if err != nil {