contractcourt: add verbose logging in resolvers

We now put the outpoint in the resolvers's logging so it's easier to
debug.
This commit is contained in:
yyforyongyu
2024-06-20 21:56:52 +08:00
parent 0bab6b3419
commit 1f2cfc6a60
6 changed files with 44 additions and 31 deletions

View File

@@ -2,6 +2,7 @@ package contractcourt
import (
"encoding/binary"
"fmt"
"io"
"github.com/lightningnetwork/lnd/channeldb"
@@ -32,7 +33,7 @@ func newBreachResolver(resCfg ResolverConfig) *breachResolver {
replyChan: make(chan struct{}),
}
r.initLogger(r)
r.initLogger(fmt.Sprintf("%T(%v)", r, r.ChanPoint))
return r
}
@@ -114,7 +115,7 @@ func newBreachResolverFromReader(r io.Reader, resCfg ResolverConfig) (
return nil, err
}
b.initLogger(b)
b.initLogger(fmt.Sprintf("%T(%v)", b, b.ChanPoint))
return b, nil
}