contractcourt: extend the ChainArbitratorConfig with IsOurAddress closure
In this commit, we add the IsOurAddress field into the config of the chain arb. With this new function closure, the chain arb is able to detect co-op on chain closes automatically.
This commit is contained in:
2 files changed
+17
-1
No files matched your search
@@ -400,6 +400,10 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
|
||||
chanID := lnwire.NewChanIDFromOutPoint(&chanPoint)
|
||||
return s.htlcSwitch.RemoveLink(chanID)
|
||||
},
|
||||
IsOurAddress: func(addr btcutil.Address) bool {
|
||||
_, err := cc.wallet.GetPrivKey(addr)
|
||||
return err == nil
|
||||
},
|
||||
}, chanDB)
|
||||
|
||||
s.breachArbiter = newBreachArbiter(&BreachConfig{
|
||||
|
||||
Reference in new issue
Block a user