diff --git a/record/mpp.go b/record/mpp.go index b28d10858..38877caf7 100644 --- a/record/mpp.go +++ b/record/mpp.go @@ -1,6 +1,7 @@ package record import ( + "fmt" "io" "github.com/lightningnetwork/lnd/lnwire" @@ -96,3 +97,8 @@ func (r *MPP) Record() tlv.Record { MPPOnionType, r, size, MPPEncoder, MPPDecoder, ) } + +// String returns a human-readable representation of the mpp payload field. +func (r *MPP) String() string { + return fmt.Sprintf("total=%v, addr=%x", r.totalMsat, r.paymentAddr) +}