contractcourt: add onchain interception

This commit is contained in:
Joost Jager committed 2022-04-13 11:31:33 +02:00
1 parent c392e003aa
commit 721fb4ee88
11 files changed
+264 -16

No files matched your search

+5 -2
View File
@@ -595,8 +595,6 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
quit: make(chan struct{}),
}
s.witnessBeacon = newPreimageBeacon(dbs.ChanStateDB.NewWitnessCache())
currentHash, currentHeight, err := s.cc.ChainIO.GetBestBlock()
if err != nil {
return nil, err
@@ -656,6 +654,11 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
s.cfg.RequireInterceptor,
)
s.witnessBeacon = newPreimageBeacon(
dbs.ChanStateDB.NewWitnessCache(),
s.interceptableSwitch.ForwardPacket,
)
chanStatusMgrCfg := &netann.ChanStatusConfig{
ChanStatusSampleInterval: cfg.ChanStatusSampleInterval,
ChanEnableTimeout: cfg.ChanEnableTimeout,