mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-18 03:21:45 +02:00
chainntfs: zero out pkscript in logging when taproot is enabled
This commit is contained in:
@@ -356,11 +356,22 @@ func NewSpendRequest(op *wire.OutPoint, pkScript []byte) (SpendRequest, error) {
|
|||||||
|
|
||||||
// String returns the string representation of the SpendRequest.
|
// String returns the string representation of the SpendRequest.
|
||||||
func (r SpendRequest) String() string {
|
func (r SpendRequest) String() string {
|
||||||
if r.OutPoint != ZeroOutPoint {
|
var (
|
||||||
return fmt.Sprintf("outpoint=%v, script=%v", r.OutPoint,
|
outpointStr = fmt.Sprintf("%v", r.OutPoint)
|
||||||
r.PkScript)
|
scriptStr = fmt.Sprintf("%v", r.PkScript)
|
||||||
|
)
|
||||||
|
|
||||||
|
if r.OutPoint == ZeroOutPoint {
|
||||||
|
outpointStr = "<zero>"
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("outpoint=<zero>, script=%v", r.PkScript)
|
|
||||||
|
// If the pk script is all zeros, we blank the pk script.
|
||||||
|
// Currently we do not support taproot pk scripts for notifications.
|
||||||
|
if r.PkScript == ZeroTaprootPkScript {
|
||||||
|
scriptStr = "<zero> (taproot pk script not supported)"
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("outpoint=%s, script=%s", outpointStr, scriptStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MatchesTx determines whether the given transaction satisfies the spend
|
// MatchesTx determines whether the given transaction satisfies the spend
|
||||||
|
Reference in New Issue
Block a user