channeldb+htlcswitch: make sure circuit is not nil in teardownCircuit

This commit is contained in:
yyforyongyu
2023-11-15 03:58:54 +08:00
committed by yyforyongyu
parent 2fc79d8946
commit 3b6e28d19b
3 changed files with 32 additions and 40 deletions

View File

@ -211,6 +211,11 @@ func (f *PkgFilter) Decode(r io.Reader) error {
return err
}
// String returns a human-readable string.
func (f *PkgFilter) String() string {
return fmt.Sprintf("count=%v, filter=%v", f.count, f.filter)
}
// FwdPkg records all adds, settles, and fails that were locked in as a result
// of the remote peer sending us a revocation. Each package is identified by
// the short chanid and remote commitment height corresponding to the revocation