contractcourt: add onchain interception

This commit is contained in:
Joost Jager
2022-02-04 14:32:15 +01:00
parent c392e003aa
commit 721fb4ee88
11 changed files with 264 additions and 16 deletions

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,