chainntnfs/txnotifier: include script in SpendRequest string representation

This commit is contained in:
Johan T. Halseth committed 2019-11-21 15:18:01 +01:00
1 parent b1e6d9c5cf
commit 2e85647ec4
1 file changed
+3 -2
+3 -2
View File
@@ -328,9 +328,10 @@ func NewSpendRequest(op *wire.OutPoint, pkScript []byte) (SpendRequest, error) {
// String returns the string representation of the SpendRequest.
func (r SpendRequest) String() string {
if r.OutPoint != ZeroOutPoint {
return fmt.Sprintf("outpoint=%v", r.OutPoint)
return fmt.Sprintf("outpoint=%v, script=%v", r.OutPoint,
r.PkScript)
}
return fmt.Sprintf("script=%v", r.PkScript)
return fmt.Sprintf("outpoint=<zero>, script=%v", r.PkScript)
}
// SpendHintKey returns the key that will be used to index the spend request's