@@ -12,6 +12,7 @@ import (
12
12
"github.com/davecgh/go-spew/spew"
13
13
"github.com/lightningnetwork/lnd/input"
14
14
"github.com/lightningnetwork/lnd/lntypes"
15
+ "github.com/lightningnetwork/lnd/lnutils"
15
16
"github.com/lightningnetwork/lnd/watchtower/blob"
16
17
"github.com/lightningnetwork/lnd/watchtower/wtdb"
17
18
)
@@ -230,6 +231,9 @@ func (p *JusticeDescriptor) CreateJusticeTxn() (*wire.MsgTx, error) {
230
231
case input .P2WPKHSize :
231
232
weightEstimate .AddP2WKHOutput ()
232
233
234
+ // NOTE: P2TR has the same size as P2WSH (34 bytes), their output sizes
235
+ // are also the same (43 bytes), so here we implicitly catch the P2TR
236
+ // output case.
233
237
case input .P2WSHSize :
234
238
weightEstimate .AddP2WSHOutput ()
235
239
@@ -260,8 +264,9 @@ func (p *JusticeDescriptor) CreateJusticeTxn() (*wire.MsgTx, error) {
260
264
261
265
sweepInputs = append (sweepInputs , toLocalInput )
262
266
263
- log .Debugf ("Found to local witness output=%#v, stack=%v" ,
264
- toLocalInput .txOut , toLocalInput .witness )
267
+ log .Debugf ("Found to local witness output=%v, stack=%x" ,
268
+ lnutils .SpewLogClosure (toLocalInput .txOut ),
269
+ toLocalInput .witness )
265
270
266
271
// If the justice kit specifies that we have to sweep the to-remote
267
272
// output, we'll also try to assemble the output and add it to weight
@@ -273,8 +278,9 @@ func (p *JusticeDescriptor) CreateJusticeTxn() (*wire.MsgTx, error) {
273
278
}
274
279
sweepInputs = append (sweepInputs , toRemoteInput )
275
280
276
- log .Debugf ("Found to remote witness output=%#v, stack=%v" ,
277
- toRemoteInput .txOut , toRemoteInput .witness )
281
+ log .Debugf ("Found to remote witness output=%v, stack=%x" ,
282
+ lnutils .SpewLogClosure (toRemoteInput .txOut ),
283
+ toRemoteInput .witness )
278
284
279
285
// Get the weight for the to-remote witness and add that to the
280
286
// estimator.
0 commit comments